switch to api NamespaceVersioning

This commit is contained in:
Laura Klünder 2016-10-06 13:23:15 +02:00
parent ab7978f61b
commit 457a7a9e86
2 changed files with 2 additions and 2 deletions

View file

@ -15,5 +15,5 @@ router.register(r'submittasks', SubmitTaskViewSet, base_name='submittask')
urlpatterns = [ urlpatterns = [
url(r'^(?P<version>v\d+)/', include(router.urls, namespace='v1')), url(r'^v1/', include(router.urls, namespace='v1')),
] ]

View file

@ -178,7 +178,7 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
REST_FRAMEWORK = { REST_FRAMEWORK = {
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning', 'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning',
'ALLOWED_VERSIONS': ['v1'], 'ALLOWED_VERSIONS': ['v1'],
'DEFAULT_VERSION': 'v1', 'DEFAULT_VERSION': 'v1',
'DEFAULT_AUTHENTICATION_CLASSES': ( 'DEFAULT_AUTHENTICATION_CLASSES': (