Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add decorator to block non-POST requests on login

  • Loading branch information...
commit 4ce0096ef5817b9242fd9aa8a67a5333c9659548 1 parent f20fada
@ramonakira ramonakira authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  fiber/admin_views.py
View
2  fiber/admin_views.py
@@ -1,4 +1,5 @@
from django.contrib.admin.views.decorators import staff_member_required
+from django.views.decorators.http import require_POST
from django.contrib.auth import authenticate, login
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
@@ -7,6 +8,7 @@
from .models import Page
+@require_POST
def fiber_login(request):
username = request.POST['username']
password = request.POST['password']
Please sign in to comment.
Something went wrong with that request. Please try again.