guild-journal/guild/urls.py

141 lines
4.1 KiB
Python
Raw Normal View History

2023-06-09 20:19:15 +00:00
from django.urls import path
import guild.views as views
2023-06-10 19:33:06 +00:00
import guild.views.player as player_views
import guild.views.character as character_views
2023-06-10 20:32:45 +00:00
import guild.views.adventure as adventure_views
2023-06-20 19:22:56 +00:00
import guild.views.playsession as playsession_views
import guild.views.settings as settings_views
import guild.views.resource as resource_views
2023-06-13 18:24:54 +00:00
from django.contrib.auth import views as auth_views
2023-06-09 20:19:15 +00:00
urlpatterns = [
path("", views.HomeView.as_view(), name="home"),
2023-06-13 19:14:02 +00:00
path("accounts/login/", auth_views.LoginView.as_view(next_page="/"), name="login"),
2023-06-13 18:24:54 +00:00
path(
2023-06-13 19:14:02 +00:00
"accounts/logout/",
2023-06-13 18:24:54 +00:00
auth_views.LogoutView.as_view(
template_name="registration/logout.html",
),
name="logout",
),
2023-06-22 18:35:43 +00:00
path("accounts/register/", views.RegisterView.as_view(), name="register"),
2023-06-11 19:25:30 +00:00
path(
"players/create/", player_views.CreatePlayerView.as_view(), name="create_player"
),
path(
"players/<int:pk>/",
player_views.PlayerDetailView.as_view(),
name="player_detail",
),
path(
"players/<int:pk>/update/",
player_views.PlayerUpdateView.as_view(),
name="player_update",
),
path(
"players/<int:pk>/delete/",
player_views.PlayerDeleteView.as_view(),
name="player_delete",
),
path(
"characters/",
character_views.CharacterListView.as_view(),
name="character_list",
),
path(
"characters/create/",
character_views.CreateCharacterView.as_view(),
name="create_character",
),
path(
"characters/<int:pk>/",
character_views.CharacterDetailView.as_view(),
name="character_detail",
),
path(
"characters/<int:pk>/update/",
character_views.CharacterUpdateView.as_view(),
name="character_update",
),
path(
"characters/<int:pk>/delete/",
character_views.CharacterDeleteView.as_view(),
name="character_delete",
),
path(
"adventures/",
adventure_views.AdventureListView.as_view(),
name="adventure_list",
),
path(
"adventures/create/",
adventure_views.CreateAdventureView.as_view(),
name="create_adventure",
),
path(
"adventures/<int:pk>/",
adventure_views.AdventureDetailView.as_view(),
name="adventure_detail",
),
path(
"adventures/<int:pk>/update/",
adventure_views.AdventureUpdateView.as_view(),
name="adventure_update",
),
path(
"adventures/<int:pk>/delete/",
adventure_views.AdventureDeleteView.as_view(),
name="adventure_delete",
),
path(
"adventures/<int:pk>/playsession/create/",
2023-06-20 19:22:56 +00:00
playsession_views.PlaySessionCreateView.as_view(),
2023-06-11 19:25:30 +00:00
name="create_playsession",
),
path(
"adventures/<int:pk>/playsession/<int:playsession_pk>/update/",
2023-06-20 19:22:56 +00:00
playsession_views.PlaySessionUpdateView.as_view(),
2023-06-11 19:25:30 +00:00
name="playsession_update",
),
path(
"adventures/<int:pk>/playsession/<int:playsession_pk>/delete/",
2023-06-20 19:22:56 +00:00
playsession_views.PlaySessionDeleteView.as_view(),
2023-06-11 19:25:30 +00:00
name="playsession_delete",
),
2023-06-20 19:22:56 +00:00
path(
"playsessions/<int:pk>/",
playsession_views.PlaySessionDetailView.as_view(),
name="playsession_detail",
),
path(
"playsessions/<int:pk>/rewards/create/",
playsession_views.CreateRewardView.as_view(),
name="create_reward",
),
path(
"playsessions/<int:pk>/rewards/<int:reward_pk>/delete/",
playsession_views.RewardDeleteView.as_view(),
name="reward_delete",
),
path(
"settings/",
settings_views.SettingsView.as_view(),
name="settings",
),
path(
"resources/create/",
resource_views.CreateResourceView.as_view(),
name="create_resource",
),
path(
"resources/<int:pk>/",
resource_views.ResourceDetailView.as_view(),
name="resource_detail",
),
path(
"resources/<int:pk>/update/",
resource_views.ResourceUpdateView.as_view(),
name="resource_update",
),
2023-06-09 20:19:15 +00:00
]