django-avatar/avatar/urls.py
0xMRTT 5e5d6f9c6a
fix(urls): use path and path converters (#228)
* fix(urls): use path and path converters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix(urls): change re_path into path

* fix(urls): remove unused imports

* fix(urls): url names

* fix(tests): update reverse

* fix(tags): update reverse

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Johannes Wilm <mail@johanneswilm.org>
2023-10-16 11:27:12 +02:00

24 lines
701 B
Python

from django.urls import path
from avatar import views
# For reversing namespaced urls
# https://docs.djangoproject.com/en/4.1/topics/http/urls/#reversing-namespaced-urls
app_name = "avatar"
urlpatterns = [
path("add/", views.add, name="add"),
path("change/", views.change, name="change"),
path("delete/", views.delete, name="delete"),
# https://docs.djangoproject.com/en/4.1/topics/http/urls/#path-converters
path(
"render_primary/<slug:user>/<int:width>/",
views.render_primary,
name="render_primary",
),
path(
"render_primary/<slug:user>/<int:width>/<int:height>/",
views.render_primary,
name="render_primary",
),
]