from django.urls import path, re_path from .views import BlogListAPIView, RelatedBlogsAPIView, BlogDetailBySlugAPIView app_name = 'blog' urlpatterns = [ # Blog list with search and sort_by filters path('list/', BlogListAPIView.as_view(), name='blog-list'), # Related blogs for a specific blog ID path('related//', RelatedBlogsAPIView.as_view(), name='related-blogs'), # Blog detail by slug (using regex to support different languages) re_path(r'^detail/(?P[\w\-\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\u200C\u200D]+)/$', BlogDetailBySlugAPIView.as_view(), name='blog-detail'), ]