freebie/api/urls.py
2026-09-27 11:27:54 +05:00

18 lines
No EOL
599 B
Python

from django.urls import path
from .views import hello, ProductListView, ProductDetailView, CategoryListView
from reviews.views import ReviewListView, LatestReviewsView, NewsletterCreateView
urlpatterns = [
path("hello/", hello),
path("products/", ProductListView.as_view()),
path("categories/", CategoryListView.as_view()),
# Reviews
path("reviews/", ReviewListView.as_view()),
path("reviews/latest/", LatestReviewsView.as_view()),
# Newsletter
path("newsletter/", NewsletterCreateView.as_view()),
path("products/<slug:slug>/", ProductDetailView.as_view()),
]