Switch CCS upload, copyright assignment, FOSSY and podcast components to use path()

This is the newer approach to URL routing in Django.
This commit is contained in:
Ben Sturmfels 2023-11-27 19:40:06 +11:00
parent aef9d18eb4
commit ebb7866739
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
3 changed files with 9 additions and 9 deletions

View file

@ -1,8 +1,8 @@
from django.conf.urls import url
from django.urls import path
from .views import AssignmentCreateView, AssignmentThanksView
urlpatterns = [
url(r'^$', AssignmentCreateView.as_view(), name='assignement-add'),
url(r'^(?P<pk>[\w-]+)/$', AssignmentThanksView.as_view(), name='assignment-thanks'),
path('', AssignmentCreateView.as_view(), name='assignement-add'),
path('<uuid:pk>/', AssignmentThanksView.as_view(), name='assignment-thanks'),
]

View file

@ -1,8 +1,8 @@
from django.conf.urls import url
from django.urls import path
from . import views
app_name = "ccs_upload"
urlpatterns = [
url(r'^$', views.upload, name='form')
path('', views.upload, name='form')
]

View file

@ -62,10 +62,10 @@ urlpatterns = [
url(r'^sustainer/', include('conservancy.supporter.urls')),
url(r'^coming-soon.html', static_views.index),
url(r'^fundraiser_data', fundgoal_views.view),
url(r'^ccs-upload/', include('conservancy.ccs_upload.urls', namespace='ccs_upload')),
url(r'^assignment/', include('conservancy.assignment.urls')),
path('ccs-upload/', include('conservancy.ccs_upload.urls', namespace='ccs_upload')),
path('assignment/', include('conservancy.assignment.urls')),
url(r'^fossy/$', static_views.index),
url(r'^fossy/', include('conservancy.fossy.urls')),
url(r'^cast/', include('conservancy.podjango.urls')),
path('fossy/', include('conservancy.fossy.urls')),
path('cast/', include('conservancy.podjango.urls')),
path('usethesource/', include('conservancy.usethesource.urls')),
]