From 5eeef792a7bdb5420288de997c3be3254ba91d66 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 13 Nov 2022 20:51:59 +0100 Subject: [PATCH] More fixes to url docs for tutorials --- docs/source/Howtos/Web-Character-Generation.md | 2 +- docs/source/Howtos/Web-Character-View-Tutorial.md | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/source/Howtos/Web-Character-Generation.md b/docs/source/Howtos/Web-Character-Generation.md index 2e60fb7d8a..3d0fa7a381 100644 --- a/docs/source/Howtos/Web-Character-Generation.md +++ b/docs/source/Howtos/Web-Character-Generation.md @@ -371,7 +371,7 @@ urlpatterns = [ # url: /chargen/ path("", views.index, name='chargen-index'), # url: /chargen/5/ - path("/", views.detail, name="chargen-detail"), + path("/", views.detail, name="chargen-detail"), # url: /chargen/create path("create/", views.creating, name='chargen-creating'), ] diff --git a/docs/source/Howtos/Web-Character-View-Tutorial.md b/docs/source/Howtos/Web-Character-View-Tutorial.md index 70220e3b21..cd6aae51a0 100644 --- a/docs/source/Howtos/Web-Character-View-Tutorial.md +++ b/docs/source/Howtos/Web-Character-View-Tutorial.md @@ -43,11 +43,11 @@ wasn't generated for you): ```python # URL patterns for the character app -from django.conf.urls import url +from django.urls import path from web.character.views import sheet urlpatterns = [ - url(r'^sheet/(?P\d+)/$', sheet, name="sheet") + path("sheet/", sheet, name="sheet") ] ``` @@ -193,13 +193,14 @@ skills the user has, or if the user is approved (assuming your game has an appro The last file we need to edit is the master URLs file. This is needed in order to smoothly integrate the URLs from your new `character` app with the URLs from Evennia's existing pages. Find the file -`web/urls.py` and update its `patterns` list as follows: +`web/website/urls.py` and update its `patterns` list as follows: ```python -# web/urls.py +# web/website/urls.py -custom_patterns = [ - url(r'^character/', include('web.character.urls')) +urlpatterns = [ + # ... + path("character/", include('web.character.urls')) ] ```