lemoncurry/lemonshort/urls.py

14 lines
367 B
Python
Raw Normal View History

from django.conf import settings
from django.urls import path, register_converter
from .convert import AbcIdConverter
from .views import unshort
2023-08-10 02:52:37 -04:00
register_converter(AbcIdConverter, "abc_id")
2023-08-10 02:52:37 -04:00
app_name = "lemonshort"
urlpatterns = tuple(
2023-08-10 02:52:37 -04:00
path("{0!s}<abc_id:tiny>".format(k), unshort, name=m, kwargs={"model": m})
for k, m in settings.SHORTEN_MODELS.items()
)