Skip to content

Commit

Permalink
Merge pull request #682 from CoreJa/master
Browse files Browse the repository at this point in the history
url from DEFAULT_API_URL now works #681
  • Loading branch information
JoelLefkowitz authored Jul 18, 2022
2 parents cb03608 + 4e6564a commit 0e09cbe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/drf_yasg/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def __init__(self, info, version='', url=None, patterns=None, urlconf=None):
raise SwaggerGenerationError("`url` must be an absolute HTTP(S) url")
if parsed_url.path:
logger.warning("path component of api base URL %s is ignored; use FORCE_SCRIPT_NAME instead" % url)
else:
self._gen.url = url

@property
def url(self):
Expand Down

0 comments on commit 0e09cbe

Please sign in to comment.