2023-12-13 02:11:29 +01:00
|
|
|
from django.urls import path
|
|
|
|
from django.conf import settings
|
|
|
|
from django.conf.urls.static import static
|
|
|
|
from . import views
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path("posts/", views.ListPosts.as_view(), name="posts"),
|
|
|
|
path("posts/<int:pk>", views.PostDetails.as_view(), name="post-details"),
|
2024-01-06 14:14:15 +01:00
|
|
|
path("posts/create/", views.AddPost.as_view(), name="add_post"),
|
2023-12-13 02:11:29 +01:00
|
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|