user registration pages

This commit is contained in:
2025-01-20 20:43:21 +00:00
parent 650cee4b0e
commit 8d8bc47e79
7 changed files with 122 additions and 21 deletions

16
urls.py
View File

@@ -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"),