Commit f94b1884 authored by Okhin's avatar Okhin
Browse files

Revert "getting rid of csrf validation on this mixin the right way, decorating dispatch"

This reverts commit 385341f9.
parent b4c60a89
Pipeline #1065 passed with stage
in 8 minutes and 40 seconds
......@@ -13,6 +13,9 @@
<div class="modal-body">
{% csrf_token %}
<div class="row">
<div class="col-sm-12">
<div class="well well-sm text-justify">{% include "text/position_info.html" %}</div>
......@@ -93,4 +96,4 @@
{% endif %}
{% endif %}
\ No newline at end of file
from django.views import generic
from django.views.decorators.csrf import csrf_exempt
from .forms import PositionForm
......@@ -16,11 +15,6 @@ class PositionFormMixin(generic.View):
position_form = None
position_created = False
def dispatch(self, request, *args, **kwargs):
return super(PositionFormMixin, self).dispatch(
request, *args, **kwargs)
def post(self, request, *args, **kwargs):
if 'position-representatives' in request.POST:
self.position_form = PositionForm(request.POST, prefix='position')
Supports Markdown
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