Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #26 from agriffis/allow-baseurl-override

Allow base_url to be overridden
  • Loading branch information...
commit e73fa3bce00ac30b78218d60ece9efe931058a95 2 parents b029793 + 9af8302
Kenneth Reitz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 dj_static.py
4 dj_static.py
View
@@ -38,12 +38,12 @@ class Cling(WSGIHandler):
"""WSGI middleware that intercepts calls to the static files
directory, as defined by the STATIC_URL setting, and serves those files.
"""
- def __init__(self, application, base_dir=None, ignore_debug=False):
+ def __init__(self, application, base_dir=None, base_url=None, ignore_debug=False):
self.application = application
self.ignore_debug = ignore_debug
if not base_dir:
base_dir = self.get_base_dir()
- self.base_url = urlparse(self.get_base_url())
+ self.base_url = urlparse(base_url or self.get_base_url())
self.cling = static.Cling(base_dir)
try:
Please sign in to comment.
Something went wrong with that request. Please try again.