Add basic authentification

This commit is contained in:
Roberto Rosario
2014-07-09 16:45:42 -04:00
parent 12ab3854f9
commit d40931ad5b

View File

@@ -266,22 +266,10 @@ REST_FRAMEWORK = {
'PAGINATE_BY': 10,
'PAGINATE_BY_PARAM': 'page_size',
'MAX_PAGINATE_BY': 100,
}
# ---------- Swagger ---------------
SWAGGER_SETTINGS = {
#"exclude_namespaces": [], # List URL namespaces to ignore
#"api_version": '0.1', # Specify your API's version
#"api_path": "/", # Specify the path to your API not a root level
#"enabled_methods": [ # Specify which methods to enable in Swagger UI
# 'get',
# 'post',
# 'put',
# 'patch',
# 'delete'
#],
#"api_key": '', # An API key
#"is_authenticated": False, # Set to True to enforce user authentication,
#"is_superuser": False, # Set to True to enforce admin only access
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
)
}
try: