Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
c9b0c3bb
Commit
c9b0c3bb
authored
6 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
GH-858: Make sure we redirect the user back to same page (inc q strings)
parent
b639e56e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
opentech/apply/activity/views.py
+1
-1
1 addition, 1 deletion
opentech/apply/activity/views.py
opentech/apply/utils/views.py
+4
-1
4 additions, 1 deletion
opentech/apply/utils/views.py
with
5 additions
and
2 deletions
opentech/apply/activity/views.py
+
1
−
1
View file @
c9b0c3bb
...
@@ -73,4 +73,4 @@ class CommentFormView(DelegatedViewMixin, CreateView):
...
@@ -73,4 +73,4 @@ class CommentFormView(DelegatedViewMixin, CreateView):
@classmethod
@classmethod
def
contribute_form
(
cls
,
instance
,
user
):
def
contribute_form
(
cls
,
instance
,
user
):
# We dont want to pass the submission as the instance
# We dont want to pass the submission as the instance
return
super
().
contribute_form
(
None
,
user
=
user
)
return
super
().
contribute_form
(
instance
=
None
,
user
=
user
)
This diff is collapsed.
Click to expand it.
opentech/apply/utils/views.py
+
4
−
1
View file @
c9b0c3bb
...
@@ -134,7 +134,10 @@ class DelegatedViewMixin(View):
...
@@ -134,7 +134,10 @@ class DelegatedViewMixin(View):
return
cls
.
context_name
,
form
return
cls
.
context_name
,
form
def
get_success_url
(
self
):
def
get_success_url
(
self
):
return
self
.
request
.
path
query
=
self
.
request
.
GET
.
urlencode
()
if
query
:
query
=
'
?
'
+
query
return
self
.
request
.
path
+
query
class
CreateOrUpdateView
(
SingleObjectTemplateResponseMixin
,
ModelFormMixin
,
ProcessFormView
):
class
CreateOrUpdateView
(
SingleObjectTemplateResponseMixin
,
ModelFormMixin
,
ProcessFormView
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment