[Migration] remove usage of @repeat_on_conflict
[mygpo.git] / mygpo / shell.py
blobec59963421edc5509fb4811aeb5ec43c9e9d9fe6
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.db.models.loading import get_models
15 from django.utils.module_loading import import_string
16 for m in get_models():
17 import_string('{module}.{model}'.format(module=m.__module__,
18 model=m.__name__))