Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 29, 2011 16:00:45

Brian C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

newbie question about paths


Suppose the project is /var/www/django/project. Following the django
with wsgi docs, you would add /var/www/django to the path, and
DJANGO_SETTINGS_MODULE would be project.settings.

However, in that case, the path scheme described in the tutorial
doesn't work, e.g. setting up admin.py for Polls as described will
throw an error because it can't find a module Polls. Instead you have
to "from project.Polls.models import Polls", which seems to break the
modularity of the Polls app (since it has the project name embedded in
it, now).

So, should the wsgi config instead add /var/www/django/project to the
path, and set DJANGO_SETTINGS_MODULE to "settings"?

--
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+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 31, 2011 08:28:12

bruno d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

newbie question about paths


On 29 jan, 17:00, Brian Craft <bc...@thecraftstudio.com> wrote:
> Suppose the project is /var/www/django/project. Following the django
> with wsgi docs, you would add /var/www/django to the path, and
> DJANGO_SETTINGS_MODULE would be project.settings.
>
> However, in that case, the path scheme described in the tutorial
> doesn't work, e.g. setting up admin.py for Polls as described will
> throw an error because it can't find a module Polls. Instead you have
> to "from project.Polls.models import Polls", which seems to break the
> modularity of the Polls app (since it has the project name embedded in
> it, now).
>
> So, should the wsgi config instead add /var/www/django/project to the
> path, and set DJANGO_SETTINGS_MODULE to "settings"?


Add both "/var/www/django" and "/var/www/django/project" to your
sys.path.

--
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+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 12th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support