summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/urls.py b/urls.py
index 42bf8f8..6f592ee 100644
--- a/urls.py
+++ b/urls.py
@@ -1,12 +1,11 @@
from django.conf import settings
-from django.urls import path
from django.conf.urls import url, include, re_path
from django.views.generic.base import RedirectView
from django.views.generic.edit import UpdateView
from django.views.generic.list import ListView
from django.contrib import admin
from django.contrib import auth
-from django.urls import reverse, resolve
+from django.urls import path, reverse, resolve
from troggle.core.views import caves, statistics, survex
from troggle.core.views.scans import scansingle, singlewallet, allwallets
@@ -59,7 +58,8 @@ else:
path('/<path:filepath>', expofilessingle, name="single"), # local copy of EXPOFILES
path('', expofilessingle, {'filepath': ""}, name="single"),
]
-
+
+# see https://docs.djangoproject.com/en/dev/topics/auth/default/
# The URLs provided by include('django.contrib.auth.urls') are:
# accounts/login/ [name='login']
@@ -71,6 +71,8 @@ else:
# accounts/reset/<uidb64>/<token>/ [name='password_reset_confirm']
# accounts/reset/done/ [name='password_reset_complete']
+# these worked in Django 2.2.24 but failed in .25 even though we include django.contrib.auth
+
trogglepatterns = [
path('expofiles/', include(expofilesurls)), # intercepted by Apache, if it is running.
path('expofiles', include(expofilesurls)), # curious interaction with the include() here, not just a slash problem.
@@ -90,10 +92,9 @@ trogglepatterns = [
path('dwguploadnogit/<path:folder>', dwgupload, {'gitdisable': 'yes'}, name='dwguploadnogit'), # used in testing
# setting LOGIN_URL = '/accounts/login/' is default
-# url ENDS WITH this string
- re_path(r'logout/$', expologout, name='expologout'), # higher precedence than /accounts/logout
- re_path(r'login/$', expologin, name='expologin'), # higher precedence than /accounts/login
- #re_path(r'^accounts/', include('django.contrib.auth.urls')), # from Dj3.0, see site-packages\registration\auth_urls_classes.py
+ 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
# Persons - nasty surname recognition logic fails for 19 people!
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"),