Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TAlone
memopol
Commits
f94b1884
Commit
f94b1884
authored
May 22, 2017
by
Okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "getting rid of csrf validation on this mixin the right way, decorating dispatch"
This reverts commit
385341f9
.
parent
b4c60a89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
src/memopol/templates/_position_form_modal.html
src/memopol/templates/_position_form_modal.html
+4
-1
src/representatives_positions/views.py
src/representatives_positions/views.py
+0
-6
No files found.
src/memopol/templates/_position_form_modal.html
View file @
f94b1884
...
...
@@ -13,6 +13,9 @@
</div>
<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 @@
$
(
"
#add-position-success
"
).
modal
(
"
show
"
);
});
</script>
{% endif %}
{% endif %}
\ No newline at end of file
src/representatives_positions/views.py
View file @
f94b1884
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
@
csrf_exempt
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'
)
...
...
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