mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
Fix router ordering for the same model
This commit is contained in:
parent
96a820c00e
commit
0875e61125
|
@ -110,8 +110,8 @@ notes_router.register(r'notes', NoteViewSet)
|
|||
notes_path_router = SimpleRouter(use_regex_path=False)
|
||||
notes_path_router.register('notes', NoteViewSet)
|
||||
|
||||
notes_without_patch_path_router = SimpleRouter(use_regex_path=False)
|
||||
notes_without_patch_path_router.register('notes', NotesWithoutPatchViewSet)
|
||||
notes_only_put = SimpleRouter(use_regex_path=False)
|
||||
notes_only_put.register('notes', NotesWithoutPatchViewSet)
|
||||
|
||||
notes_path_default_router = DefaultRouter(use_regex_path=False)
|
||||
notes_path_default_router.register('notes', NoteViewSet)
|
||||
|
@ -505,8 +505,8 @@ class TestUrlPath(URLPatternsTestCase, TestCase):
|
|||
urlpatterns = [
|
||||
path('path/', include(url_path_router.urls)),
|
||||
path('default/', include(notes_path_default_router.urls)),
|
||||
path('methods/', include(notes_only_put.urls)),
|
||||
path('example/', include(notes_path_router.urls)),
|
||||
path('methods/', include(notes_without_patch_path_router.urls)),
|
||||
]
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user