mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
* 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>
24 lines
701 B
Python
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",
|
|
),
|
|
]
|