Added check if demo website
This commit is contained in:
parent
f8264ce3ec
commit
336c1cdcc3
@ -111,10 +111,13 @@ def feeds(request):
|
||||
|
||||
def feed_delete(request, id):
|
||||
try:
|
||||
# demo website: disable deleting feeds
|
||||
if not request.get_host() == "hrss.hipstercat.fr:443":
|
||||
Feed.objects.get(pk=id).delete()
|
||||
except Exception as e:
|
||||
pass
|
||||
finally:
|
||||
return redirect("/feeds")
|
||||
else:
|
||||
return HttpResponse("Deleting is disabled on demo website.", status=403)
|
||||
except ObjectDoesNotExist:
|
||||
return redirect("/feeds")
|
||||
|
||||
def rss(request, uurl):
|
||||
|
Loading…
Reference in New Issue
Block a user