Commit b676813b authored by okhin's avatar okhin 🚴
Browse files

Merge branch '195-csrf-verification-failed-csrf-cookie-when-submitting-forms' into 'master'

Resolve "CSRF verification failed. (CSRF cookie when submitting forms)"

Closes #195

See merge request !201
parents c3a2099e 5e84caa8
Pipeline #1060 passed with stage
in 10 minutes and 10 seconds
......@@ -5,8 +5,6 @@
# Usage: from repo root, `source bin/`
set -x
REPOROOT=$(dirname $(dirname $0))
# Ensure we're at the root of the memopol repository
from django.views import generic
from django.views.decorators.csrf import csrf_exempt
from .forms import PositionForm
......@@ -15,6 +16,7 @@ class PositionFormMixin(generic.View):
position_form = None
position_created = False
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