Pergunta

Im trying to deploy my django proyect under a webfaction server. I have an app named "home".

FACT A) If i move my "home" folder to the same directory of manage.py and i set my setting.py like this, the app works fine.

INSTALLED_APPS = (
'home'
)

FACT B) If i move my "home" folder to the apps directory, and set my settings.py like this, i recive an error "No module named myproject.apps.home"

INSTALLED_APPS = (
'myroject.apps.home'
)

The thing is i want to set my "home" app under the apps folder. Where could be the problem? i've been trying to configurate httpd.conf in apache but i didn't succeed.

This is my folder tree:

myproject_name
  -apache2
  -bin
  -lib
  --myproject
    -manage.py
    --myproject
      -wsgi.py
      -urls.py
      -__init__.py
      -settings.py
      -apps

Django version: 1.4.2 python version: 2.7 mod_wsgi version: 3.4

Thanks for your time

Foi útil?

Solução

The home and apps folders must have __init__.py file to be considerd as a package. Make sure you have it there.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top