aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/settings.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-08-14 22:34:45 +0200
committerGravatar Johannes Christ <[email protected]>2018-08-14 22:34:45 +0200
commitb854d8f22ea16f02cfd516275d13e61c81964333 (patch)
tree1a7e54d95e003a4b3642690e193621fad6ce7021 /pysite/settings.py
parentAdd `djangorestframework`. (diff)
Add bot API key permission check.
Diffstat (limited to 'pysite/settings.py')
-rw-r--r--pysite/settings.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pysite/settings.py b/pysite/settings.py
index cf89bb40..247a27a9 100644
--- a/pysite/settings.py
+++ b/pysite/settings.py
@@ -159,3 +159,14 @@ if DEBUG:
PARENT_HOST = 'pythondiscord.local:8000'
else:
PARENT_HOST = 'pythondiscord.com'
+
+# Django REST framework
+# http://www.django-rest-framework.org
+REST_FRAMEWORK = {
+ 'DEFAULT_PERMISSION_CLASSES': [
+ 'pysite.permissions.HasValidAPIKey'
+ ]
+}
+
+# Bot API settings
+BOT_API_KEY = env('BOT_API_KEY')