Yes, it is doable. It is not particularly beautiful, though:
make models a module, so your directory structure looks like this:
- models |- __init__.py |- some_model.py |- some_other_model.py |- ...
now the magic is in __init__.py and some small additions to the models. __init__.py :
from some_model import SomeModel from some_other_model import SomeOtherModel __all__ = [ 'SomeModel', 'SomeOtherModel', ]
some_model.py:
class SomeModel(models.Model): class Meta(object): app_label = 'yourapplabel' db_table = 'yourapplabel_somemodel'
tback
source share