summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-01-20 20:43:21 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2025-01-20 20:43:21 +0000
commit8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4 (patch)
tree993d3a3cb585cba584450a414488c1fd50641cc7 /urls.py
parent650cee4b0eadebb648e50057931ae78edc2f2a62 (diff)
downloadtroggle-8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4.tar.gz
troggle-8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4.tar.bz2
troggle-8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4.zip
user registration pages
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/urls.py b/urls.py
index b7527fe..d6d9ffc 100644
--- a/urls.py
+++ b/urls.py
@@ -47,16 +47,20 @@ from troggle.core.views.logbooks import (
logentrydelete,
logreport,
notablepersons,
+ people_ids,
person,
personexpedition,
)
from troggle.core.views.other import controlpanel, exportlogbook, frontpage, todos
from troggle.core.views.prospect import prospecting
+from troggle.core.views.user_registration import register
from troggle.core.views.scans import allscans, cavewallets, scansingle, walletslistperson, walletslistyear
from troggle.core.views.signup import signup
from troggle.core.views.uploads import dwgupload, expofilerename, gpxupload, photoupload
from troggle.core.views.wallets_edit import walletedit
+# from troggle.core.views.user_registration import SignUpView # Warning: a Class-based View
+
"""This sets the actualurlpatterns[] and urlpatterns[] lists which django uses
to resolve urls - in both directions as these are declarative.
@@ -134,12 +138,13 @@ trogglepatterns = [
re_path(r'^caves$', caveindex, name="caveindex"),
re_path(r'^indxal.htm$', caveindex, name="caveindex"), # ~420 hrefs to this url in expoweb files
re_path(r'^people/?$', notablepersons, name="notablepersons"),
+ path('people_ids', people_ids, name="people_ids"),
path('caveslist', caveslist, name="caveslist"),
path('entrances', entranceindex, name="entranceindex"),
re_path(r'^admin/doc/', include('django.contrib.admindocs.urls')), # needs docutils Python module (http://docutils.sf.net/).
- re_path(r'^admin/', admin.site.urls), # includes admin login & logout urls & /admin/jsi18n/
+ path('admin/', admin.site.urls), # includes admin login & logout urls & /admin/jsi18n/
# Uploads - uploading a file
path('walletedit/', walletedit, name='walletedit'),
@@ -163,11 +168,12 @@ trogglepatterns = [
# NB setting url pattern name to 'login' instea dof 'expologin' with override Django, see https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns
path('accounts/logout/', expologout, name='expologout'), # same as in django.contrib.auth.urls
path('accounts/login/', expologin, name='expologin'), # same as in django.contrib.auth.urls
- #re_path(r'^accounts/', include('django.contrib.auth.urls')), # see site-packages\registration\auth_urls_classes.py
+ path("accounts/register", register, name="register"),
+ #path("accounts/register", SignUpView.as_view(), name="signup"),
+ path('accounts/', include('django.contrib.auth.urls')), # see site-packages\registration\auth_urls_classes.py
+
-# Persons - nasty surname recognition logic fails for 19 people! See also Wallets by person below.
- # path('person/<str:name>', person, name="person"), # This is much more complex than it looks..
- path('person/<slug:slug>', person, name="person"),
+ path('person/<slug:slug>', person, name="person"),
#re_path(r'^person/(?P<first_name>[A-Z]*[a-z\-\'&;]*)[^a-zA-Z]*(?P<last_name>[a-z\-\']*[^a-zA-Z]*[\-]*[A-Z]*[a-zA-Z\-&;]*)/?', person, name="person"),
#re_path(r'^personexpedition/(?P<first_name>[A-Z]*[a-z&;]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-zA-Z&;]*)/(?P<year>\d+)/?$', personexpedition, name="personexpedition"),
path('personexpedition/<slug:slug>/<int:year>', personexpedition, name="personexpedition"),