diff --git a/guild/templates/guild/home.html b/guild/templates/guild/home.html
index c86e91c..1515846 100644
--- a/guild/templates/guild/home.html
+++ b/guild/templates/guild/home.html
@@ -3,19 +3,15 @@
{% block content %}
Home
-
+
-Adventures
{% for adventure in adventures %}
@@ -25,7 +21,14 @@
{% endfor %}
-Characters
+
{% for character in characters %}
@@ -35,7 +38,14 @@
{% endfor %}
-Players
+
{% for player in players %}
diff --git a/guild/urls.py b/guild/urls.py
index 1a2fcd8..17280af 100644
--- a/guild/urls.py
+++ b/guild/urls.py
@@ -3,9 +3,18 @@ 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
+from django.contrib.auth import views as auth_views
urlpatterns = [
path("", views.HomeView.as_view(), name="home"),
+ path("acounnt/login/", auth_views.LoginView.as_view(next_page="/"), name="login"),
+ path(
+ "account/logout/",
+ auth_views.LogoutView.as_view(
+ template_name="registration/logout.html",
+ ),
+ name="logout",
+ ),
# path("players/", views.PlayerListView.as_view(), name="player_list"),
path(
"players/create/", player_views.CreatePlayerView.as_view(), name="create_player"
diff --git a/guild/views/account.py b/guild/views/account.py
new file mode 100644
index 0000000..e69de29
diff --git a/guild/views/adventure.py b/guild/views/adventure.py
index a686c63..d22eeb5 100644
--- a/guild/views/adventure.py
+++ b/guild/views/adventure.py
@@ -50,6 +50,7 @@ class PlaySessionCreateView(LoginRequiredMixin, CreateView):
class PlaySessionUpdateView(LoginRequiredMixin, UpdateView):
model = PlaySession
form_class = PlaySessionForm
+ pk_url_kwarg = "playsession_pk"
def dispatch(self, request, *args, **kwargs):
self.adventure = get_object_or_404(Adventure, pk=kwargs["pk"])
diff --git a/guild_journal/urls.py b/guild_journal/urls.py
index 3003f2a..d89bd1f 100644
--- a/guild_journal/urls.py
+++ b/guild_journal/urls.py
@@ -19,6 +19,5 @@ from django.urls import include, path
urlpatterns = [
path("admin/", admin.site.urls),
- path("accounts/", include("django.contrib.auth.urls")),
path("", include(("guild.urls", "guild"), namespace="guild")),
]
diff --git a/templates/base.html b/templates/base.html
index b823b64..2ebce8c 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -67,6 +67,17 @@
-
Characters
+
+ {% if user.is_authenticated %}
+ -
+ Logout
+
+ {% else %}
+ -
+ Login
+
+ {% endif %}
+
diff --git a/templates/registration/login.html b/templates/registration/login.html
index 4e47fd6..46fffff 100644
--- a/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -15,7 +15,7 @@
{% endif %}
{% endif %}
-