from django.urls import include, path, register_converter from . import converters, views register_converter(converters.Base64Converter, "base64") subsubpatterns = [ path("/", views.empty_view, name="subsubpattern-base64"), ] subpatterns = [ path("/", views.empty_view, name="subpattern-base64"), path( "/", include( (subsubpatterns, "second-layer-namespaced-base64"), "instance-ns-base64" ), ), ] urlpatterns = [ path("base64//", views.empty_view, name="base64"), path("base64//subpatterns/", include(subpatterns)), path( "base64//namespaced/", include((subpatterns, "namespaced-base64")) ), ]