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
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
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
Political Memory
memopol
Commits
385341f9
Commit
385341f9
authored
May 22, 2017
by
Okhin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getting rid of csrf validation on this mixin the right way, decorating dispatch
parent
b676813b
Pipeline
#1061
failed with stage
in 9 minutes and 30 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
src/memopol/templates/_position_form_modal.html
src/memopol/templates/_position_form_modal.html
+1
-4
src/representatives_positions/views.py
src/representatives_positions/views.py
+4
-0
No files found.
src/memopol/templates/_position_form_modal.html
View file @
385341f9
...
...
@@ -13,9 +13,6 @@
</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>
...
...
@@ -96,4 +93,4 @@
$
(
"
#add-position-success
"
).
modal
(
"
show
"
);
});
</script>
{% endif %}
\ No newline at end of file
{% endif %}
src/representatives_positions/views.py
View file @
385341f9
...
...
@@ -17,6 +17,10 @@ class PositionFormMixin(generic.View):
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'
)
...
...
okhin
🚴
@okhin
mentioned in commit
f94b1884
·
May 22, 2017
mentioned in commit
f94b1884
mentioned in commit f94b1884511b65c77eb901f8d713adcba9308d29
Toggle commit list
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