Sunday, August 29, 2010

Re: manage.py: syncdb/sql do not pick up models from custom directory structure

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. Are you sure it cannot find them? sometimes when
there is an import error or syntax error, manage.py syncdb gives a
misleading message that it cannot find the app/model in question. To
test this, in your shell, try:

import lib.models

if that works then try:

from lib.models import * - you may get an error here
--
regards
Kenneth Gonsalves

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment