Merge branch 'jupyter'
[mygpo.git] / mygpo / shell.py
blobe9f8ac71b7a6b32da1109110161bc2bc0b76e533
2 # This file collects imports that can be useful when doing maintenance stuff
3 # from the shell.
4 # You can then just run
6 # from mygpo.shell import *
8 # to get all relevant classes, and an instantiated db object.
11 from django.core.cache import cache
13 # Auto-import all Models
14 from django.apps import apps
15 from django.utils.module_loading import import_string
16 for m in apps.get_models():
17 import_string('{module}.{model}'.format(module=m.__module__,
18 model=m.__name__))