Skip to content

Commit d284aa6

Browse files
committed
Add redirect for /me page
1 parent 8202b68 commit d284aa6

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

pgcommitfest/commitfest/templates/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h3>CommitFests</h3>
9595
</p>
9696

9797
<hr>
98-
<h3>Your Dashboard</h3>
98+
<h3 id="dashboard">Your Dashboard</h3>
9999

100100
{% if not user.is_authenticated %}
101101
<div class="my-4">

pgcommitfest/commitfest/views.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ def home(request):
146146
return render(request, "home.html", context)
147147

148148

149+
@login_required
150+
def me_legacy_redirect(request):
151+
# Previously we would have a dedicated dashboard page, now this
152+
# is on the homepage.
153+
return HttpResponseRedirect("/#dashboard")
154+
155+
149156
def commitfest_history(request):
150157
cfs = list(CommitFest.objects.order_by("-enddate"))
151158

pgcommitfest/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
re_path(r"^api/v1/commitfests/needs_ci$", apiv1.commitfestst_that_need_ci),
2020
re_path(r"^help/$", views.help),
2121
re_path(r"^commitfest_history/$", views.commitfest_history),
22+
re_path(r"^me/$", views.me_legacy_redirect),
2223
re_path(r"^archive/$", views.archive),
2324
re_path(r"^activity(?P<rss>\.rss)?/", views.activity),
2425
re_path(r"^(\d+)/$", views.commitfest),

0 commit comments

Comments
 (0)