Commit b676813b authored by okhin's avatar okhin 🚴

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
......@@ -5,8 +5,6 @@
# Usage: from repo root, `source bin/quickstart.sh`
#
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
@csrf_exempt
def post(self, request, *args, **kwargs):
if 'position-representatives' in request.POST:
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