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):
|
def feed_delete(request, id):
|
||||||
try:
|
try:
|
||||||
|
# demo website: disable deleting feeds
|
||||||
|
if not request.get_host() == "hrss.hipstercat.fr:443":
|
||||||
Feed.objects.get(pk=id).delete()
|
Feed.objects.get(pk=id).delete()
|
||||||
except Exception as e:
|
return redirect("/feeds")
|
||||||
pass
|
else:
|
||||||
finally:
|
return HttpResponse("Deleting is disabled on demo website.", status=403)
|
||||||
|
except ObjectDoesNotExist:
|
||||||
return redirect("/feeds")
|
return redirect("/feeds")
|
||||||
|
|
||||||
def rss(request, uurl):
|
def rss(request, uurl):
|
||||||
|
Loading…
Reference in New Issue
Block a user