Oleg Komarov
7fc8d31ce8
See #64 This PR changes the model: unused `reply_to` field is removed, a new RatingReply model is introduced instead. This simplifies prefetches and is better suited to the task of supporting a single reply per rating. Co-authored-by: Márton Lente <marton@blender.org> Reviewed-on: #181 Reviewed-by: Anna Sirota <annasirota@noreply.localhost>
23 lines
668 B
Python
23 lines
668 B
Python
from django.urls import path, re_path, include
|
|
|
|
from . import views
|
|
from constants.base import EXTENSION_SLUGS_PATH
|
|
|
|
app_name = 'ratings'
|
|
urlpatterns = [
|
|
re_path(
|
|
rf'^(?P<type_slug>(?:{EXTENSION_SLUGS_PATH}))/',
|
|
include(
|
|
[
|
|
path('<slug:slug>/reviews/', views.RatingsView.as_view(), name='for-extension'),
|
|
path('<slug:slug>/reviews/new/', views.AddRatingView.as_view(), name='new'),
|
|
path(
|
|
'<slug:slug>/reviews/<int:pk>/reply/',
|
|
views.AddRatingReplyView.as_view(),
|
|
name='reply',
|
|
),
|
|
]
|
|
),
|
|
)
|
|
]
|