Default to JSON only API for base settings.

This commit is contained in:
Christopher Charbonneau Wells 2017-08-20 13:31:19 -04:00
parent f02e0b59bd
commit 2db3f43394
2 changed files with 13 additions and 1 deletions

View File

@ -118,5 +118,8 @@ STATICFILES_DIRS = [
REST_FRAMEWORK = { REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [ 'DEFAULT_PERMISSION_CLASSES': [
'api.permissions.BabyBlotterDjangoModelPermissions' 'api.permissions.BabyBlotterDjangoModelPermissions'
] ],
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
)
} }

View File

@ -17,3 +17,12 @@ DATABASES = {
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
} }
} }
# Django Rest Framework
# http://www.django-rest-framework.org/#
REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = (
'rest_framework.renderers.JSONRenderer',
'rest_framework.renderers.BrowsableAPIRenderer',
)