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

This commit is contained in:
Danielle McLean 2018-05-04 12:19:54 +10:00
parent e9c46f23db
commit 70e57e4155
Signed by untrusted user: 00dani
GPG key ID: 8EB789DDF3ABD240
4 changed files with 16 additions and 16 deletions

View file

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

View file

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

View file

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

View file

@ -1,12 +1,12 @@
from django.conf.urls import url
from django.urls import path
from . import views
app_name = 'wellknowns'
urlpatterns = [
url(r'^keybase.txt$', views.keybase, name='keybase'),
url(r'^host-meta$', views.host_meta_xml, name='host-meta'),
url(r'^host-meta.json$', views.host_meta_json, name='host-meta.json'),
url(r'^manifest.json$', views.manifest, name='manifest'),
url(r'^webfinger$', views.webfinger, name='webfinger'),
path('keybase.txt', views.keybase, name='keybase'),
path('host-meta', views.host_meta_xml, name='host-meta'),
path('host-meta.json', views.host_meta_json, name='host-meta.json'),
path('manifest.json', views.manifest, name='manifest'),
path('webfinger', views.webfinger, name='webfinger'),
]