From be890da7291d2b11e31e537b10ef67f473be966b Mon Sep 17 00:00:00 2001 From: thinkt4nk Date: Thu, 11 Jan 2018 16:19:02 -0500 Subject: [PATCH] added base path to template context --- rest_framework_swagger/renderers.py | 1 + rest_framework_swagger/settings.py | 1 + 2 files changed, 2 insertions(+) diff --git a/rest_framework_swagger/renderers.py b/rest_framework_swagger/renderers.py index 61768f2a..b4b34a52 100644 --- a/rest_framework_swagger/renderers.py +++ b/rest_framework_swagger/renderers.py @@ -41,6 +41,7 @@ def get_customizations(self): data = {} if swagger_settings.SECURITY_DEFINITIONS: data['securityDefinitions'] = swagger_settings.SECURITY_DEFINITIONS + data['basePath'] = swagger_settings.BASE_PATH return data diff --git a/rest_framework_swagger/settings.py b/rest_framework_swagger/settings.py index c4a5dbd5..9084a013 100644 --- a/rest_framework_swagger/settings.py +++ b/rest_framework_swagger/settings.py @@ -25,6 +25,7 @@ 'patch' ], 'VALIDATOR_URL': '', + 'BASE_PATH': '', } IMPORT_STRINGS = []