Commit 5e84caa8 authored by Okhin's avatar Okhin
Browse files

We do not need csrf on non authenticated views

parent 4f9690bb
from django.views import generic from django.views import generic
from django.views.decorators.csrf import csrf_exempt
from .forms import PositionForm from .forms import PositionForm
...@@ -15,6 +16,7 @@ class PositionFormMixin(generic.View): ...@@ -15,6 +16,7 @@ class PositionFormMixin(generic.View):
position_form = None position_form = None
position_created = False position_created = False
@csrf_exempt
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
if 'position-representatives' in request.POST: if 'position-representatives' in request.POST:
self.position_form = PositionForm(request.POST, prefix='position') self.position_form = PositionForm(request.POST, prefix='position')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment