Hi all,
I'm currently migrating my Django project that was still in the "old"
project layout to the new default project layout as shown at
<https://docs.djangoproject.com/en/1.5/intro/reusable-apps/#your-project-and-your-reusable-app>
My WSGI file was written as described at
<http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango>
The instructions there say:
The directory added to sys.path would be the directory containing the package
for the Django site created by running:
django-admin.py startproject mysite
In other words, it should be the directory you were in when 'django-admin.py'
was run.
That is, in the WSGI file I had a line
sys.path.append('/home/carsten')
where my actual project root was '/home/carsten/Zeiterfassung', and
therefore all project-related import statements or targets in the
urlpatterns began with 'Zeiterfassung. ...'
However, with the new project layout, it seems that the correct way to
make it work is *contrary* to the description in the
IntegrationWithDjango article:
Is it right that the python path should now include the project root
directory?
That is, in my case, I now need
sys.path.append('/home/carsten/Zeiterfassung')
in the WSGI file, because e.g. settings.py is now really at
'/home/carsten/Zeiterfassung/Zeiterfassung/settings.py'.
It also means that I have to change all my old import statements ("Lori"
is the app name) from
from Zeiterfassung.Lori.models import XY
to
from Lori.models import XY
Is that right, and in the sense of the new project layout?
I'm asking all this because this being contrary to the
IntegrationWithDjango made me unsure, and
<https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/modwsgi/#basic-configuration>
uses both "mysite.com" and "mysite", and says
The WSGIPythonPath line ensures that your project package is available for
import on the Python path; in other words, that import mysite works.
but it's still not clear to me if this really expresses the same meaning
as I understood it above.
Best regards,
Carsten
--
Dipl.-Inf. Carsten Fuchs
Carsten Fuchs Software
Industriegebiet 3, c/o Rofu, 55768 Hoppstädten-Weiersbach, Germany
Internet: http://www.cafu.de | E-Mail: [email protected]
Cafu - the open-source game and graphics engine for multiplayer 3D action
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.