On Thu, 2006-09-28 at 02:38 +, Gary Wilson wrote:
> Malcolm Tredinnick wrote:
> > You also need to have the model in the __all__ export of
> > models/__init__.py, otherwise it doesn't get imported into the
> > appropriate namespace as part of "import myapp.models".
>
> Well, adding the model
Malcolm Tredinnick wrote:
> You also need to have the model in the __all__ export of
> models/__init__.py, otherwise it doesn't get imported into the
> appropriate namespace as part of "import myapp.models".
Well, adding the model modules to __all__ doesn't work either (isn't
this for when you do
On Wed, 2006-09-27 at 14:06 +, Gary Wilson wrote:
> Malcolm Tredinnick wrote:
> > When you have models in a deeper structure like this, you need to
> > explicitly tell the model what the app name is. You do this as follows:
> >
> > class SimpleTest(models.Model):
> > ...
> >
Malcolm Tredinnick wrote:
> When you have models in a deeper structure like this, you need to
> explicitly tell the model what the app name is. You do this as follows:
>
> class SimpleTest(models.Model):
> ...
> class Meta:
> app_label="appfolder"
>
> This
On Tue, 2006-09-26 at 20:29 -0700, cydeshow wrote:
> Supposedly django allows you to create an app with a directory called
> models that contains files with model definitions in it. Instead of the
> default models.py single file. I can't seem to get it to work I have
> tracked down what seems to b
Supposedly django allows you to create an app with a directory called
models that contains files with model definitions in it. Instead of the
default models.py single file. I can't seem to get it to work I have
tracked down what seems to be the correct syntax for the __init__ file
but to no avail.
6 matches
Mail list logo