On Jun 26, 12:18 am, Frederico Betting <[email protected]>
wrote:
> Hi All
>
> I am beginner in using django framework and I'm trying to do a project with
> a different directory structure but it's not working and I don't know what I
> am doing wrong.
> Follow an example for what I am doing:
>
> project
> `-- core
>     |-- app1
>     |   |-- __init__.py
>     |   `-- models
>     |       |-- __init__.py
>     |       |-- model01.py
>     |       `-- model02.py
>     `-- app2
>         |-- __init__.py
>         `-- models
>             |-- __init__.py
>             |-- model03.py
>             `-- model04.py
>
(snip)

> In the settings.py file, I updated INSTALLED_APPS adding the values
> 'core.app1' and 'core.app2'.
> When I try to sync with DB, nothing happens. When I set the command "python
> manage.py sql core.app1" I get the message: "*Error: App with label
> core.app1 could not be found. Are you sure your INSTALLED_APPS setting is
> correct?*".

Add an empty __init__.py file in your "core" directory to make it a
python package  ("core.app1" looks for a subpackage "app1" in package
"core").

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

Reply via email to