On Saturday 04 February 2006 00:42, Luke Plant wrote:
> from someotherfile import Foo, Bar
> from django.db.models import register_models
> register_models(sys.modules[__name__], Foo, Bar)
I've eliminated the need for this register_models() call now. I took
out the whole module._MODELS thing t
On Friday 03 February 2006 22:18, Luke Plant wrote:
> It is currently very difficult to have models anywhere except
> models.py. The reason is to do with the way that the ModelBase
> metaclass (1) works out the app_label, (2) adds the '_MODEL'
> attributes to the module containing the model classes
It is currently very difficult to have models anywhere except models.py.
The reason is to do with the way that the ModelBase metaclass (1) works
out the app_label, (2) adds the '_MODEL' attributes to the module
containing the model classes. Importing the model classes into
models.py doesn't