django/tests/urlpatterns/path_base64_urls.py
Xaroth Brook 39e61669e0 [2.1.x] Fixed #29415 -- Fixed detection of custom URL converters in included patterns.
Backport of 39283c8edbc5991b589d48a8e17152042193f2df from master
2018-05-26 20:29:29 -04:00

16 lines
489 B
Python

from django.urls import include, path, register_converter
from . import converters, views
register_converter(converters.Base64Converter, 'base64')
subpatterns = [
path('<base64:value>/', views.empty_view, name='subpattern-base64'),
]
urlpatterns = [
path('base64/<base64:value>/', views.empty_view, name='base64'),
path('base64/<base64:base>/subpatterns/', include(subpatterns)),
path('base64/<base64:base>/namespaced/', include((subpatterns, 'namespaced-base64'))),
]