From b854d8f22ea16f02cfd516275d13e61c81964333 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Tue, 14 Aug 2018 22:34:45 +0200 Subject: Add bot API key permission check. --- pysite/settings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pysite/settings.py') 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') -- cgit v1.2.3