From cd804f2c7712a1563889b53c8f70ef6aa8d838ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 3 Jun 2024 18:18:58 +0200 Subject: [PATCH] Sort url paths --- games/urls.py | 78 ++++++++++++++++++++++----------------------- timetracker/urls.py | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/games/urls.py b/games/urls.py index d00f77f..d65ab3b 100644 --- a/games/urls.py +++ b/games/urls.py @@ -4,15 +4,37 @@ from games import views urlpatterns = [ path("", views.index, name="index"), + path("device/add", views.add_device, name="add_device"), + path("edition/add", views.add_edition, name="add_edition"), path( - "session/list/recent", - views.list_sessions, - {"filter": "recent"}, - name="list_sessions_recent", + "edition/add/for-game/", + views.add_edition, + name="add_edition_for_game", ), + path("edition//edit", views.edit_edition, name="edit_edition"), path("game/add", views.add_game, name="add_game"), + path("game//edit", views.edit_game, name="edit_game"), + path("game//view", views.view_game, name="view_game"), path("platform/add", views.add_platform, name="add_platform"), - path("session/add", views.add_session, name="add_session"), + path("platform//edit", views.edit_platform, name="edit_platform"), + path("purchase/add", views.add_purchase, name="add_purchase"), + path("purchase//edit", views.edit_purchase, name="edit_purchase"), + path( + "purchase//delete", + views.delete_purchase, + name="delete_purchase", + ), + path( + "purchase/related-purchase-by-edition", + views.related_purchase_by_edition, + name="related_purchase_by_edition", + ), + path( + "purchase/add/for-edition/", + views.add_purchase, + name="add_purchase_for_edition", + ), + path("session/add", views.add_session, name="add_session"), path( "session/add/for-purchase/", views.add_session, @@ -30,6 +52,12 @@ urlpatterns = [ {"template": "list_sessions.html#session-row"}, name="list_sessions_start_session_from_session", ), + path("session//edit", views.edit_session, name="edit_session"), + path( + "session//delete", + views.delete_session, + name="delete_session", + ), path( "session/end/from-game/", views.end_session, @@ -42,41 +70,13 @@ urlpatterns = [ {"template": "list_sessions.html#session-row"}, name="list_sessions_end_session", ), - path( - "session//delete", - views.delete_session, - name="delete_session", - ), - path( - "purchase//delete", - views.delete_purchase, - name="delete_purchase", - ), - path("purchase/add", views.add_purchase, name="add_purchase"), - path( - "purchase/add/for-edition/", - views.add_purchase, - name="add_purchase_for_edition", - ), - path( - "related-purchase-by-edition", - views.related_purchase_by_edition, - name="related_purchase_by_edition", - ), - path("edition/add", views.add_edition, name="add_edition"), - path( - "edition/add/for-game/", - views.add_edition, - name="add_edition_for_game", - ), - path("edition//edit", views.edit_edition, name="edit_edition"), - path("game//view", views.view_game, name="view_game"), - path("game//edit", views.edit_game, name="edit_game"), - path("platform//edit", views.edit_platform, name="edit_platform"), - path("device/add", views.add_device, name="add_device"), - path("session//edit", views.edit_session, name="edit_session"), - path("purchase//edit", views.edit_purchase, name="edit_purchase"), path("session/list", views.list_sessions, name="list_sessions"), + path( + "session/list/recent", + views.list_sessions, + {"filter": "recent"}, + name="list_sessions_recent", + ), path( "session/list/by-purchase/", views.list_sessions, diff --git a/timetracker/urls.py b/timetracker/urls.py index 93c856d..2736d15 100644 --- a/timetracker/urls.py +++ b/timetracker/urls.py @@ -23,10 +23,10 @@ from graphene_django.views import GraphQLView urlpatterns = [ path("", RedirectView.as_view(url="/tracker")), + path("graphql", csrf_exempt(GraphQLView.as_view(graphiql=True))), path("login/", auth_views.LoginView.as_view(), name="login"), path("logout/", auth_views.LogoutView.as_view(), name="logout"), path("tracker/", include("games.urls")), - path("graphql", csrf_exempt(GraphQLView.as_view(graphiql=True))), ] if settings.DEBUG: