On 30 Aug., 13:56, Daniel Roseman wrote:
> In your lib/models/__init__.py, do `from FooModels import *` for each
> model file.
OK, that does the trick. When I import the models in lib/__init__.py
they are being recognized by the manage.py script. I guess I could
just look for *.py files in lib/mod
If you define your models somewhere django doesn't expect, I think you
need to add the app_label in the model's Meta class.
http://docs.djangoproject.com/en/1.2/ref/models/options/#app-label
They mention the models submodule use case in the docs.
Hope that helps,
Alex
On Aug 30, 6:56 am, Daniel
On Aug 30, 7:46 am, Dan wrote:
> On 30 Aug., 08:26, Kenneth Gonsalves wrote:> import
> lib.models
>
> > from lib.models import * - you may get an error here
>
> Both commands work without giving any error messages. However they do
> not actually import anything, since the models reside in sepera
On 30 Aug., 08:26, Kenneth Gonsalves wrote:
> import lib.models
>
> from lib.models import * - you may get an error here
Both commands work without giving any error messages. However they do
not actually import anything, since the models reside in seperate
files in the models subdir and need to be
On Mon, 2010-08-30 at 08:20 +0200, Daniel Klaffenbach wrote:
>
> The problem is that the manage.py script does not seem to be aware of
> these models. I added "myproject.lib" to the INSTALLED_APPS section in
> the settings file, but manage.py still cannot find any models.
that is not possible. A
Hi,
I am working on a pretty big application and somewhat changed the
default directory structure a bit. I now have an app called "lib" in
my project dir. This application contains two folders: "models" and
"templatetags". The __init__.py files are present in all
subdirectories. Whenever I want to
6 matches
Mail list logo