Re: Models in separate files

2006-02-04 Thread Luke Plant
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

Re: Models in separate files

2006-02-03 Thread Luke Plant
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

Models in separate files

2006-02-03 Thread Luke Plant
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