guild-journal/guild/urls.py

141 lines
4.1 KiB
Python

from django.urls import path
import guild.views as views
import guild.views.player as player_views
import guild.views.character as character_views
import guild.views.adventure as adventure_views
import guild.views.playsession as playsession_views
import guild.views.settings as settings_views
import guild.views.resource as resource_views
from django.contrib.auth import views as auth_views
urlpatterns = [
path("", views.HomeView.as_view(), name="home"),
path("accounts/login/", auth_views.LoginView.as_view(next_page="/"), name="login"),
path(
"accounts/logout/",
auth_views.LogoutView.as_view(
template_name="registration/logout.html",
),
name="logout",
),
path("accounts/register/", views.RegisterView.as_view(), name="register"),
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/",
playsession_views.PlaySessionCreateView.as_view(),
name="create_playsession",
),
path(
"adventures/<int:pk>/playsession/<int:playsession_pk>/update/",
playsession_views.PlaySessionUpdateView.as_view(),
name="playsession_update",
),
path(
"adventures/<int:pk>/playsession/<int:playsession_pk>/delete/",
playsession_views.PlaySessionDeleteView.as_view(),
name="playsession_delete",
),
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",
),
]