peyman escribió:
> The mod_python instructions at 
> http://www.djangoproject.com/documentation/modpython/
> seems incomplete. I followed the tutorial, but I had to add 2 paths to
> my Apache config before the mysite sample would work: the project
> directory and it's parent. Or am I missing something?
> 
>   <Location "/">
>     SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>     PythonPath "['/home/someuser','/home/someuser/mysite'] + sys.path"
>     PythonDebug On
>   </Location>
> 
> 
> > 

It seems so. What you need to add depends on your project's setup. If
you add it's parent folder (eg, your project is in
/home/me/django/project, you add /home/me/django). Then you reference
the project by it's name, 'project', as in 'project.settings', or
'project.urls'.

Think of the Python path as something python sticks together with the
module names you provide in order to find the full path to a variable,
function, class, whatever. You can try it on the shell:

#cat ${PYTHONPATH}/project/settings.py

Does it work? Chances are, in python it will also work.

Good luck, and remember the change those paths according to your setup!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Attachment: 0x2688D707.asc
Description: application/pgp-keys

Reply via email to