summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pgcommitfest/commitfest/views.py7
-rw-r--r--pgcommitfest/urls.py2
2 files changed, 6 insertions, 3 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index 6040c1b..6a1f294 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -81,7 +81,7 @@ def activity(request, cfid=None, rss=None):
})
-def redir(request, what):
+def redir(request, what, end):
if what == 'open':
cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_OPEN))
elif what == 'inprogress':
@@ -96,7 +96,10 @@ def redir(request, what):
messages.warning(request, "More than one {0} commitfest exists, redirecting to startpage instead.".format(what))
return HttpResponseRedirect("/")
- return HttpResponseRedirect("/%s/" % cfs[0].id)
+ query_string = request.GET.urlencode()
+ if query_string:
+ query_string = '?' + query_string
+ return HttpResponseRedirect(f"/{cfs[0].id}/{end}{query_string}")
def commitfest(request, cfid):
diff --git a/pgcommitfest/urls.py b/pgcommitfest/urls.py
index d15705e..9e4d6f8 100644
--- a/pgcommitfest/urls.py
+++ b/pgcommitfest/urls.py
@@ -17,7 +17,7 @@ urlpatterns = [
re_path(r'^$', views.home),
re_path(r'^activity(?P<rss>\.rss)?/', views.activity),
re_path(r'^(\d+)/$', views.commitfest),
- re_path(r'^(open|inprogress)/$', views.redir),
+ re_path(r'^(open|inprogress)/(.*)$', views.redir),
re_path(r'^(?P<cfid>\d+)/activity(?P<rss>\.rss)?/$', views.activity),
re_path(r'^(\d+)/(\d+)/$', views.patch),
re_path(r'^(\d+)/(\d+)/edit/$', views.patchform),