Skip to content

Commit

Permalink
Updated the discovery url to be based of base_path if provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Glick committed Feb 9, 2015
1 parent eb37416 commit ee6e4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework_swagger/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get(self, request, *args, **kwargs):
template_name = SWAGGER_SETTINGS.get('template_path')
data = {
'swagger_settings': {
'discovery_url': "%sapi-docs/" % request.build_absolute_uri(),
'discovery_url': SWAGGER_SETTINGS.get('base_path', '') or "%sapi-docs/" % request.build_absolute_uri(),
'api_key': SWAGGER_SETTINGS.get('api_key', ''),
'token_type': SWAGGER_SETTINGS.get('token_type'),
'enabled_methods': mark_safe(
Expand Down

0 comments on commit ee6e4a6

Please sign in to comment.