Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
5e84caa8
Commit
5e84caa8
authored
May 22, 2017
by
Okhin
Browse files
We do not need csrf on non authenticated views
parent
4f9690bb
Pipeline
#1058
passed with stage
in 10 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/representatives_positions/views.py
View file @
5e84caa8
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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment