moved short links to main path

This commit is contained in:
Alexander Karpov 2023-06-26 19:48:24 +03:00
parent 1aa39d1d20
commit 099cca3aab
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
app_name = "blog"
urlpatterns = [
path("", post_list_view, name="post_list"),
path("<str:slug>", post_detail_view, name="post"),
path("p/<str:slug>", post_detail_view, name="post"),
path("create/", post_create_view, name="post_create"),
path("<str:slug>/edit", post_update_view, name="post_edit"),
path("<str:slug>/comment", comment, name="comment"),

View File

@ -39,7 +39,7 @@
path("ckeditor/", include("ckeditor_uploader.urls")),
path("accounts/", include("allauth.urls")),
path("", include("akarpov.blog.urls", namespace="blog")),
path("s/<str:slug>", redirect_view, name="short_url"),
path("<str:slug>", redirect_view, name="short_url"),
# Your stuff: custom urls includes go here
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)