Skip to content

Commit

Permalink
Only accept POST requests
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Nov 10, 2011
1 parent 201a21f commit e1e1447
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reminders/views.py
@@ -1,8 +1,10 @@
from django.conf import settings
from django.http import HttpResponse, Http404
from django.http import HttpResponse, Http404, HttpResponseNotAllowed


def dismiss(request, label):
if request.method != "POST":
return HttpResponseNotAllowed(["POST"])
if label not in settings.REMINDERS:
return Http404()
if not settings.REMINDERS.get(label).get("dismissable", True):
Expand Down

0 comments on commit e1e1447

Please sign in to comment.