forked from django-compressor/django-appconf
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved tests into a new appconf package. Shouldn't have any different …
…behavior.
- Loading branch information
Showing
11 changed files
with
60 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from __future__ import absolute_import | ||
from .base import AppConf # noqa | ||
|
||
# following PEP 386, versiontools will pick it up | ||
__version__ = (0, 4, 1, "final", 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import sys | ||
|
||
|
||
def import_attribute(import_path, exception_handler=None): | ||
from django.utils.importlib import import_module | ||
module_name, object_name = import_path.rsplit('.', 1) | ||
try: | ||
module = import_module(module_name) | ||
except: # pragma: no cover | ||
if callable(exception_handler): | ||
exctype, excvalue, tb = sys.exc_info() | ||
return exception_handler(import_path, exctype, excvalue, tb) | ||
else: | ||
raise | ||
try: | ||
return getattr(module, object_name) | ||
except: # pragma: no cover | ||
if callable(exception_handler): | ||
exctype, excvalue, tb = sys.exc_info() | ||
return exception_handler(import_path, exctype, excvalue, tb) | ||
else: | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters