From b77c382d9a10c83d5d0e270787a058c0a5787b2e Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Mon, 15 Feb 2016 18:17:15 +0100 Subject: [PATCH] add hobo rest_authentication class to service (#9974) --- debian/debian_config_common.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/debian_config_common.py b/debian/debian_config_common.py index 19baf00..0b5ab78 100644 --- a/debian/debian_config_common.py +++ b/debian/debian_config_common.py @@ -196,3 +196,14 @@ BROKER_URL = 'amqp://' BROKER_TASK_EXPIRES = 120 STATICS_HASH_COUNTER = '/var/lib/publik/statics-counter' + + +if 'rest_framework' in INSTALLED_APPS: + if 'REST_FRAMEWORK' not in globals(): + REST_FRAMEWORK = {} + + if 'DEFAULT_AUTHENTICATION_CLASSES' in REST_FRAMEWORK: + REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] += ('hobo.rest_authentication.PublikAuthentication',) + else: + REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = ('hobo.rest_authentication.PublikAuthentication',) + -- 2.7.0