mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
* Add Django 1.8 to test environments in tox.ini * Update python versions supported by Django master in tox.ini * Don't load 'url' from template library 'future' - it is no longer available in Django master, and is not needed in Django 1.4 and later, which is as far back as django-constance tests * get_cache dropped from Django master * post_syncdb signal dropped * django.utils.importlib dropped There are still errors on some environments that I didn't try to address: * coverage seems broken on py32 * django-master seems currently broken on py27 (non-ASCII character somewhere, I expect django-master will be fixed soon since they still claim py27 support) * django14 seems broken: "NoReverseMatch: u"'admin" is not a registered namespace"
9 lines
243 B
Python
9 lines
243 B
Python
try:
|
|
from importlib import import_module
|
|
except ImportError:
|
|
from django.utils.importlib import import_module
|
|
|
|
|
|
def import_module_attr(path):
|
|
package, module = path.rsplit('.', 1)
|
|
return getattr(import_module(package), module)
|