Browse Source

Port the urls for lemonauth, lemonshort, micropub, and wellknowns to path()

tags/v1.9.7
Danielle McLean 1 year ago
parent
commit
70e57e4155
Signed by: Danielle McLean <dani@00dani.me> GPG Key ID: 8EB789DDF3ABD240
4 changed files with 16 additions and 16 deletions
  1. 6
    6
      lemonauth/urls.py
  2. 2
    2
      lemonshort/urls.py
  3. 2
    2
      micropub/urls.py
  4. 6
    6
      wellknowns/urls.py

+ 6
- 6
lemonauth/urls.py View File

@@ -1,11 +1,11 @@
1
-from django.conf.urls import url
1
+from django.urls import path
2 2
 from . import views
3 3
 
4 4
 app_name = 'lemonauth'
5 5
 urlpatterns = [
6
-    url('^login$', views.login, name='login'),
7
-    url('^logout$', views.logout, name='logout'),
8
-    url('^indie$', views.IndieView.as_view(), name='indie'),
9
-    url('^indie/approve$', views.indie_approve, name='indie_approve'),
10
-    url('^token$', views.TokenView.as_view(), name='token'),
6
+    path('login', views.login, name='login'),
7
+    path('logout', views.logout, name='logout'),
8
+    path('indie', views.IndieView.as_view(), name='indie'),
9
+    path('indie/approve', views.indie_approve, name='indie_approve'),
10
+    path('token', views.TokenView.as_view(), name='token'),
11 11
 ]

+ 2
- 2
lemonshort/urls.py View File

@@ -1,10 +1,10 @@
1 1
 from django.conf import settings
2
-from django.conf.urls import url
2
+from django.urls import path
3 3
 
4 4
 from .views import unshort
5 5
 
6 6
 app_name = 'lemonshort'
7 7
 urlpatterns = tuple(
8
-    url(r'^{0!s}(?P<tiny>\w+)$'.format(k), unshort, kwargs={'model': m})
8
+    path('{0!s}<tiny>'.format(k), unshort, name=m, kwargs={'model': m})
9 9
     for k, m in settings.SHORTEN_MODELS.items()
10 10
 )

+ 2
- 2
micropub/urls.py View File

@@ -1,7 +1,7 @@
1
-from django.conf.urls import url
1
+from django.urls import path
2 2
 from . import views
3 3
 
4 4
 app_name = 'micropub'
5 5
 urlpatterns = (
6
-    url('^$', views.micropub, name='micropub'),
6
+    path('', views.micropub, name='micropub'),
7 7
 )

+ 6
- 6
wellknowns/urls.py View File

@@ -1,12 +1,12 @@
1
-from django.conf.urls import url
1
+from django.urls import path
2 2
 
3 3
 from . import views
4 4
 
5 5
 app_name = 'wellknowns'
6 6
 urlpatterns = [
7
-    url(r'^keybase.txt$', views.keybase, name='keybase'),
8
-    url(r'^host-meta$', views.host_meta_xml, name='host-meta'),
9
-    url(r'^host-meta.json$', views.host_meta_json, name='host-meta.json'),
10
-    url(r'^manifest.json$', views.manifest, name='manifest'),
11
-    url(r'^webfinger$', views.webfinger, name='webfinger'),
7
+    path('keybase.txt', views.keybase, name='keybase'),
8
+    path('host-meta', views.host_meta_xml, name='host-meta'),
9
+    path('host-meta.json', views.host_meta_json, name='host-meta.json'),
10
+    path('manifest.json', views.manifest, name='manifest'),
11
+    path('webfinger', views.webfinger, name='webfinger'),
12 12
 ]

Loading…
Cancel
Save