forked from expo/troggle
fix side effects in tests: git and file upload
This commit is contained in:
16
urls.py
16
urls.py
@@ -39,7 +39,11 @@ which is vital to writing code for the webapp. So the URL dispatch is declarativ
|
||||
The API urls return TSV or JSON and are new in July 2020.
|
||||
"""
|
||||
|
||||
todo = '''Replace most re_path() with modern and simpler path(). Test VERY CAREFULLY for each chnage. It is fragile.
|
||||
todo = '''Replace most re_path() with modern and simpler path().
|
||||
The admin and logout paths need to stay using re_path() as they
|
||||
have to be locked to the start.
|
||||
The final _edit and CATCHALL also have to use re_path().
|
||||
Test VERY CAREFULLY for each change. It is fragile.
|
||||
'''
|
||||
|
||||
# Many of these patterns do not work because troggle spent many years broken and we have
|
||||
@@ -80,9 +84,11 @@ trogglepatterns = [
|
||||
re_path(r'^admin/', admin.site.urls), # includes admin login & logout urls
|
||||
|
||||
# Uploads - uploading a file
|
||||
path('scanupload/<wallet>', scanupload, name='scanupload'), # wallet=2020#01, not a path
|
||||
path('dwgupload/<path:folder>', dwgupload, name='dwgupload'),
|
||||
path('dwgupload/', dwgupload, name='dwgupload'),
|
||||
path('scanupload/<wallet>', scanupload, name='scanupload'), # wallet=2020#01, not a path
|
||||
path('dwgupload/<path:folder>', dwgupload, name='dwgupload'),
|
||||
path('dwgupload/', dwgupload, name='dwgupload'),
|
||||
path('dwguploadnogit/', dwgupload, {'gitdisable': 'yes'}, name='dwguploadnogit'), # used in testing
|
||||
path('dwguploadnogit/<path:folder>', dwgupload, {'gitdisable': 'yes'}, name='dwguploadnogit'), # used in testing
|
||||
|
||||
# setting LOGIN_URL = '/accounts/login/' is default
|
||||
# url ENDS WITH this string
|
||||
@@ -160,8 +166,6 @@ trogglepatterns = [
|
||||
path('dwgfiles', dwgallfiles, name="dwgallfiles"),
|
||||
path('dwgfiles/', dwgallfiles, name="dwgallfiles"),
|
||||
path('dwgdataraw/<path:path>', dwgfilesingle, name="dwgfilesingle"),
|
||||
# path('dwgdataraw/<path:path>/upload', dwgfileupload, name="dwgfileupload"), # Not working
|
||||
|
||||
|
||||
# QMs pages - must precede other /caves pages?
|
||||
re_path(r'^cave/qms/([^/]+)/?$', caves.caveQMs), # Broken- QMs have no proper link to cave id
|
||||
|
||||
Reference in New Issue
Block a user