Fixes: 1) Correct router naming in `blog/urls.py` from `payment_router` to `blog_router` for clarity; Extra: 1) Refactor obsolete `StaticPagesSitemap.PAGES` structure with a dynamic `items` method; 2) Create placeholder 404 URLs for non-existent slugs; 3) Update and simplify docstring for `Post` class, replacing inline details with a concise translation-aware docstring.
13 lines
314 B
Python
13 lines
314 B
Python
from django.urls import include, path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from blog.viewsets import PostViewSet
|
|
|
|
app_name = "blog"
|
|
|
|
blog_router = DefaultRouter()
|
|
blog_router.register(prefix=r"posts", viewset=PostViewSet, basename="posts")
|
|
|
|
urlpatterns = [
|
|
path(r"", include(blog_router.urls)),
|
|
]
|