summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/src/pharos_dashboard
diff options
context:
space:
mode:
authormaxbr <maxbr@mi.fu-berlin.de>2017-01-05 12:34:37 +0100
committermaxbr <maxbr@mi.fu-berlin.de>2017-01-05 12:34:37 +0100
commit55c3b53ba08b2c6cf3c392b10a065a3076525951 (patch)
tree43ae585550a312c4c91bb002626cec5770556e98 /tools/pharos-dashboard/src/pharos_dashboard
parent688948508e373829cdcd7bb1e4ebb7f55e43cdac (diff)
Add library for dashboard API
JIRA: PHAROS-265 The DashboardAPI class can be used to query and update dashboard data. Change-Id: I584a3cc500ff1d67011c18af4e73e504126310a2 Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/src/pharos_dashboard')
-rw-r--r--tools/pharos-dashboard/src/pharos_dashboard/settings.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/pharos-dashboard/src/pharos_dashboard/settings.py b/tools/pharos-dashboard/src/pharos_dashboard/settings.py
index 2c4e8ccf..084f8786 100644
--- a/tools/pharos-dashboard/src/pharos_dashboard/settings.py
+++ b/tools/pharos-dashboard/src/pharos_dashboard/settings.py
@@ -5,7 +5,7 @@ from datetime import timedelta
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = os.environ['DEBUG']
+DEBUG = False
# Application definition
@@ -25,6 +25,7 @@ INSTALLED_APPS = [
'bootstrap3',
'crispy_forms',
'rest_framework',
+ 'rest_framework.authtoken',
]
MIDDLEWARE = [
@@ -131,7 +132,11 @@ REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
],
- 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)
+ 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',),
+ 'DEFAULT_AUTHENTICATION_CLASSES': (
+ 'rest_framework.authentication.SessionAuthentication',
+ 'rest_framework.authentication.TokenAuthentication',
+ )
}
MEDIA_ROOT = '/media'
@@ -173,4 +178,4 @@ CELERYBEAT_SCHEDULE = {
'task': 'dashboard.tasks.database_cleanup',
'schedule': timedelta(hours=24)
},
-} \ No newline at end of file
+}