diff options
| author | 2018-08-14 22:34:45 +0200 | |
|---|---|---|
| committer | 2018-08-14 22:34:45 +0200 | |
| commit | b854d8f22ea16f02cfd516275d13e61c81964333 (patch) | |
| tree | 1a7e54d95e003a4b3642690e193621fad6ce7021 /pysite/settings.py | |
| parent | Add `djangorestframework`. (diff) | |
Add bot API key permission check.
Diffstat (limited to '')
| -rw-r--r-- | pysite/settings.py | 11 | 
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')  |