django-configurations/configurations/__init__.py

32 lines
695 B
Python
Raw Normal View History

2012-07-21 13:56:04 +00:00
# flake8: noqa
from .base import Configuration
from .decorators import pristinemethod
2012-07-21 13:56:04 +00:00
__version__ = '2.1'
__all__ = ['Configuration', 'pristinemethod']
def _setup():
from . import importer
importer.install()
from django.apps import apps
if not apps.ready:
import django
django.setup()
def load_ipython_extension(ipython):
"""
The `ipython` argument is the currently active `InteractiveShell`
instance, which can be used in any way. This allows you to register
new magics or aliases, for example.
"""
_setup()
def setup(app=None):
"""Function used to initialize configurations similar to :func:`.django.setup`."""
_setup()