From 683d523da90a1eb338d313c15dd77604968f8c31 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 30 Apr 2020 01:43:12 +0200 Subject: [PATCH] Prepare patterns --- apps/member/urls.py | 9 ++++++++ apps/tournament/urls.py | 7 ++++++ templates/base.html | 49 +++++++++++++++++------------------------ 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/apps/member/urls.py b/apps/member/urls.py index 87ee918..ca881bd 100644 --- a/apps/member/urls.py +++ b/apps/member/urls.py @@ -1,4 +1,5 @@ from django.urls import path +from django.views.generic import RedirectView from .views import CreateUserView, DocumentView @@ -7,4 +8,12 @@ app_name = "member" urlpatterns = [ path('signup/', CreateUserView.as_view(), name="signup"), path("file//", DocumentView.as_view(), name="document"), + path("my-account/", RedirectView.as_view(pattern_name="index"), name="my_account"), + path("add-team/", RedirectView.as_view(pattern_name="index"), name="add_team"), + path("join-team/", RedirectView.as_view(pattern_name="index"), name="join_team"), + path("my-team/", RedirectView.as_view(pattern_name="index"), name="my_team"), + path("my-team/update/", RedirectView.as_view(pattern_name="index"), name="update_my_team"), + path("profiles/", RedirectView.as_view(pattern_name="index"), name="all_profiles"), + path("orphaned-profiles/", RedirectView.as_view(pattern_name="index"), name="orphaned_profiles"), + path("organizers/", RedirectView.as_view(pattern_name="index"), name="organizers"), ] diff --git a/apps/tournament/urls.py b/apps/tournament/urls.py index 4086472..bfe39cf 100644 --- a/apps/tournament/urls.py +++ b/apps/tournament/urls.py @@ -1,4 +1,5 @@ from django.urls import path +from django.views.generic import RedirectView from .views import TournamentListView, TournamentDetailView, TeamDetailView @@ -6,6 +7,12 @@ app_name = "tournament" urlpatterns = [ path('list/', TournamentListView.as_view(), name="list"), + path("add/", RedirectView.as_view(pattern_name="index"), name="add"), path('/', TournamentDetailView.as_view(), name="detail"), path('team//', TeamDetailView.as_view(), name="team_detail"), + path("add-organizer/", RedirectView.as_view(pattern_name="index"), name="add_organizer"), + path("solutions/", RedirectView.as_view(pattern_name="index"), name="solutions"), + path("all-solutions/", RedirectView.as_view(pattern_name="index"), name="all_solutions"), + path("syntheses/", RedirectView.as_view(pattern_name="index"), name="syntheses"), + path("all_syntheses/", RedirectView.as_view(pattern_name="index"), name="all_syntheses"), ] diff --git a/templates/base.html b/templates/base.html index 1d33818..66c67fa 100644 --- a/templates/base.html +++ b/templates/base.html @@ -70,96 +70,87 @@