2019-12-03 12:01:17 +00:00
|
|
|
from .base import Configuration # noqa
|
|
|
|
|
from .decorators import pristinemethod # noqa
|
|
|
|
|
from .version import __version__ # noqa
|
|
|
|
|
|
2012-07-21 13:56:04 +00:00
|
|
|
|
2016-07-29 22:00:47 +00:00
|
|
|
__all__ = ['Configuration', 'pristinemethod']
|
2013-09-18 21:24:51 +00:00
|
|
|
|
|
|
|
|
|
2015-02-13 21:18:33 +00:00
|
|
|
def _setup():
|
2013-09-18 21:24:51 +00:00
|
|
|
from . import importer
|
|
|
|
|
|
|
|
|
|
importer.install()
|
2015-01-06 22:54:10 +00:00
|
|
|
|
2018-03-15 11:48:39 +00:00
|
|
|
from django.apps import apps
|
|
|
|
|
if not apps.ready:
|
|
|
|
|
import django
|
|
|
|
|
django.setup()
|
2015-02-01 15:47:37 +00:00
|
|
|
|
2015-01-06 22:54:10 +00:00
|
|
|
|
2015-02-13 21:18:33 +00:00
|
|
|
def load_ipython_extension(ipython):
|
2015-01-06 22:54:10 +00:00
|
|
|
"""
|
2015-02-13 21:18:33 +00:00
|
|
|
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()
|
|
|
|
|
|
2015-01-06 22:54:10 +00:00
|
|
|
|
2015-02-13 21:18:33 +00:00
|
|
|
def setup(app=None):
|
2016-05-23 13:56:52 +00:00
|
|
|
"""Function used to initialize configurations similar to :func:`.django.setup`."""
|
2015-02-13 21:18:33 +00:00
|
|
|
_setup()
|