Skip to content

Commit

Permalink
Rename the module-level constant to something more fitting now that w…
Browse files Browse the repository at this point in the history
…e no longer only load applications.
  • Loading branch information
miracle2k committed Dec 4, 2010
1 parent 84769c5 commit c483ae2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/django_assets/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def import_module(app):
return __import__(app, {}, {}, [app.split('.')[-1]]).__path__


_APPLICATIONS_LOADED = False
_ASSETS_LOADED = False

def autoload():
"""Find assets by looking for an ``assets`` module within each
Expand All @@ -101,8 +101,8 @@ def autoload():
TOOD: Not thread-safe!
TODO: Bring back to status output via callbacks?
"""
global _APPLICATIONS_LOADED
if _APPLICATIONS_LOADED:
global _ASSETS_LOADED
if _ASSETS_LOADED:
return False

# Import this locally, so that we don't have a global Django
Expand Down Expand Up @@ -146,11 +146,11 @@ def autoload():
#if options.get('verbosity') > 1:
# print "assets module loaded"

_APPLICATIONS_LOADED = True

# Look for an assets.py at the project level
try:
import_module('assets')
except ImportError:
# not found, just ignore
pass

_ASSETS_LOADED = True

0 comments on commit c483ae2

Please sign in to comment.