Browse Source

add rest framework configure to production settings.

master
Mohsen Taba 5 months ago
parent
commit
5bc1e50f43
  1. 21
      config/settings/production.py

21
config/settings/production.py

@ -67,9 +67,28 @@ CACHES = {
# profiles_sample_rate=1.0,
# )
REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = [
# REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = [
# 'rest_framework.renderers.JSONRenderer',
# ]
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS': 'utils.pagination.StandardResultsSetPagination',
'PAGE_SIZE': 16,
# 'DEFAULT_AUTHENTICATION_CLASSES': [
# 'apps.account.auth_back.TokenAuthentication2',
# ],
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
# 'rest_framework.authentication.SessionAuthentication',
],
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
'EXCEPTION_HANDLER': 'utils.exceptions.exception_handler',
'DEFAULT_RENDERER_CLASSES':[
'rest_framework.renderers.JSONRenderer',
]
}
LOGGING = {

Loading…
Cancel
Save