[python-chinese] 请教apache运行django的小问题

Brightman mr.brightman在gmail.com
星期五 四月 13 12:00:46 HKT 2007


Ben Luo 写道:
>
>
> On 4/13/07, *Brightman* <mr.brightman在gmail.com
> <mailto:mr.brightman在gmail.com>> wrote:
>
>     使用apache mod_python运行django,在找/templates目录时,它会到
>     serverroot目
>     录下去找,而不是在我设置的 DocumentRoot。我用的是window,也不能建立
>     符号连
>     接,而且这样也不好。我的配置如下:
>     <VirtualHost 127.0.0.1:80 <http://127.0.0.1:80>>
>     DocumentRoot "D:/project/superstar"
>     LoadModule python_module modules/mod_python.so
>
>
>     SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     SetEnv DJANGO_SETTINGS_MODULE superstar.settings
>     PythonPath "['D:\project'] + sys.path"
>     PythonDebug On
>     </VirtualHost>
>
>
> 好像和apache无关吧。应该是 project 中的settings.py 的设置。
settings.py取得是相对目录,结果这个相对目录是相对serverroot。
> ------------------------------------------------------------------------
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese



关于邮件列表 python-chinese 的更多信息