In the model's meta class, give it a field app_label, eg:
class MyModel(models.Model):
...
class Meta:
app_label = "myapp"
I use this to split my models into multiple files in a models
subdirectory of my app. Adding a __init__.py with
from modelfile import *
for each model file m
One issue is that for syncdb to work it has to find all of the models.
It does this,
IIUC, by importing models from each INSTALLED_APP. If you can arrange for
that to import your added model, you are on the right track. For example, you
can make your models.py files each import an extra file con
Hi ,
is there any way to build a new model from outside of models.py ? or in
other application ?
i want to build a model for a class for each application
--
lxsameer
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
3 matches
Mail list logo