From 099cca3aab3ac9038be5bbb0c09c759296d4e303 Mon Sep 17 00:00:00 2001 From: Alexander-D-Karpov Date: Mon, 26 Jun 2023 19:48:24 +0300 Subject: [PATCH] moved short links to main path --- akarpov/blog/urls.py | 2 +- config/urls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/akarpov/blog/urls.py b/akarpov/blog/urls.py index 3619536..d4cd7b2 100644 --- a/akarpov/blog/urls.py +++ b/akarpov/blog/urls.py @@ -13,7 +13,7 @@ app_name = "blog" urlpatterns = [ path("", post_list_view, name="post_list"), - path("", post_detail_view, name="post"), + path("p/", post_detail_view, name="post"), path("create/", post_create_view, name="post_create"), path("/edit", post_update_view, name="post_edit"), path("/comment", comment, name="comment"), diff --git a/config/urls.py b/config/urls.py index 967c292..b645c3e 100644 --- a/config/urls.py +++ b/config/urls.py @@ -39,7 +39,7 @@ path("ckeditor/", include("ckeditor_uploader.urls")), path("accounts/", include("allauth.urls")), path("", include("akarpov.blog.urls", namespace="blog")), - path("s/", redirect_view, name="short_url"), + path("", redirect_view, name="short_url"), # Your stuff: custom urls includes go here ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)