switch to api NamespaceVersioning
This commit is contained in:
parent
ab7978f61b
commit
457a7a9e86
2 changed files with 2 additions and 2 deletions
|
@ -15,5 +15,5 @@ router.register(r'submittasks', SubmitTaskViewSet, base_name='submittask')
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^(?P<version>v\d+)/', include(router.urls, namespace='v1')),
|
||||
url(r'^v1/', include(router.urls, namespace='v1')),
|
||||
]
|
||||
|
|
|
@ -178,7 +178,7 @@ USE_L10N = True
|
|||
USE_TZ = True
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning',
|
||||
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning',
|
||||
'ALLOWED_VERSIONS': ['v1'],
|
||||
'DEFAULT_VERSION': 'v1',
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue