forked from expo/troggle
New User registration form
This commit is contained in:
43
urls.py
43
urls.py
@@ -1,6 +1,8 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.views import PasswordResetView # class-based view
|
||||
|
||||
from django.urls import include, path, re_path
|
||||
|
||||
from troggle.core.views import statistics, survex
|
||||
@@ -53,7 +55,7 @@ from troggle.core.views.logbooks import (
|
||||
)
|
||||
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, reset_done
|
||||
from troggle.core.views.user_registration import register, newregister, reset_done, ExpoPasswordResetForm
|
||||
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
|
||||
@@ -106,24 +108,6 @@ else:
|
||||
path('<path:filepath>', expofilessingle, name="single"), # local copy of EXPOFILES
|
||||
]
|
||||
|
||||
# see https://docs.djangoproject.com/en/dev/topics/auth/default/tiny
|
||||
# The URLs provided by include('django.contrib.auth.urls') are:
|
||||
#
|
||||
# accounts/login/ [name='login']
|
||||
# accounts/logout/ [name='logout']
|
||||
# accounts/password_change/ [name='password_change']
|
||||
# accounts/password_change/done/ [name='password_change_done']
|
||||
# accounts/password_reset/ [name='password_reset']
|
||||
# accounts/password_reset/done/ [name='password_reset_done']
|
||||
# accounts/reset/<uidb64>/<token>/ [name='password_reset_confirm']
|
||||
# accounts/reset/done/ [name='password_reset_complete']
|
||||
|
||||
# BUT many of these are set up by opinionated Django even if 'django.contrib.auth.urls' is NOT included.
|
||||
# Some overlap with 'admin.site.urls' needs to be investigated.
|
||||
|
||||
# admin.site.urls is urls() which maps to get_urls() which is a function declared
|
||||
# in django/contrib/admin/sites.py which for me is
|
||||
# /home/philip/expo/troggle/.venv/lib/python3.xx/site-packages/django/contrib/admin/sites.py
|
||||
|
||||
trogglepatterns = [
|
||||
path('pubs.htm', pubspage, name="pubspage"), # ~165 hrefs to this url in expoweb files
|
||||
@@ -164,13 +148,34 @@ trogglepatterns = [
|
||||
# Renaming an uploaded file
|
||||
path('expofilerename/<path:filepath>', expofilerename, name='expofilerename'),
|
||||
|
||||
# see https://docs.djangoproject.com/en/dev/topics/auth/default/tiny
|
||||
# The URLs provided by include('django.contrib.auth.urls') are:
|
||||
#
|
||||
# accounts/login/ [name='login']
|
||||
# accounts/logout/ [name='logout']
|
||||
# accounts/password_change/ [name='password_change']
|
||||
# accounts/password_change/done/ [name='password_change_done']
|
||||
# accounts/password_reset/ [name='password_reset']
|
||||
# accounts/password_reset/done/ [name='password_reset_done']
|
||||
# accounts/reset/<uidb64>/<token>/ [name='password_reset_confirm']
|
||||
# accounts/reset/done/ [name='password_reset_complete']
|
||||
|
||||
# BUT many of these are set up by opinionated Django even if 'django.contrib.auth.urls' is NOT included.
|
||||
# Some overlap with 'admin.site.urls' needs to be investigated.
|
||||
|
||||
# admin.site.urls is urls() which maps to get_urls() which is a function declared
|
||||
# in django/contrib/admin/sites.py which for me is
|
||||
# /home/philip/expo/troggle/.venv/lib/python3.xx/site-packages/django/contrib/admin/sites.py
|
||||
|
||||
# setting LOGIN_URL = '/accounts/login/' is default.
|
||||
# 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
|
||||
path("accounts/register/<slug:username>", register, name="re_register"), # overriding django.contrib.auth.urls
|
||||
path("accounts/register/", register, name="register"), # overriding django.contrib.auth.urls
|
||||
path("accounts/newregister/", newregister, name="newregister"),
|
||||
path("accounts/reset/done/", reset_done, name="password_reset_done"), # overriding django.contrib.auth.urls
|
||||
path('accounts/password_reset/', PasswordResetView.as_view(form_class=ExpoPasswordResetForm), name='password_reset'),
|
||||
path('accounts/', include('django.contrib.auth.urls')), # see line 109 in this file NB initial "/accounts/" in URL
|
||||
|
||||
path('person/<slug:slug>', person, name="person"),
|
||||
|
||||
Reference in New Issue
Block a user