Skip to content

Commit

Permalink
Update collectstatic_js_reverse.py
Browse files Browse the repository at this point in the history
Implemented (better) solution by graingert.
  • Loading branch information
LuukOost committed Nov 7, 2018
1 parent c8b86fe commit 88597da
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -37,10 +37,7 @@ def handle(self, *args, **options):
if fs.exists(file):
fs.delete(file)

try:
urlconf = settings.ROOT_URLCONF
except AttributeError:
urlconf = None
urlconf = getattr(settings, 'ROOT_URLCONF', None)
default_urlresolver = get_resolver(urlconf)
content = generate_js(default_urlresolver)
fs.save(file, ContentFile(content))
Expand Down

0 comments on commit 88597da

Please sign in to comment.