I've read this documentation:
http://www.djangoproject.com/documentation/modpython/
but I can't figure out how to configure the VirtualHost section to get
the URLs I want.

Here's what I'm trying to do:
I have one Django project (data) with two apps under it (trades,
marks). I also have the admin app installed. I have setup a CNAME alias
for 'data' to point to my server (Win 2003 Srv) running Apache2 and
Django 0.91.

I want
- http://data/trades to go to my trade app
- http://data/marks to go to my marks app
- http://data/admin to go to the admin app for this project

It kind of works but I frequently get the TemplateSyntaxError message
that the above document is supposed to fix when I go to the admin site.
The problem is that I can't figure out how to map the advice in that
document to my Apache config. Here it is:
--
NameVirtualHost *
<VirtualHost *>
    ServerName data
    DocumentRoot "C:/Dev/Source/Web/data"
    SetHandler mod_python
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE data.settings
    PythonPath sys.path+['C:/Dev/Source/Web']
    PythonDebug On
    PythonAutoReload On
    Alias /admin-media/
"C:/Python24/Lib/site-packages/Django-0.91-py2.4.egg/django/contrib/admin/media/"
    <Location "/admin-media/">
        SetHandler none
    </Location>
</VirtualHost>
--

And my urls.py is:
--
from django.conf.urls.defaults import *

urlpatterns = patterns('',
    (r'^trades/', include('data.trades.urls')),
    (r'^marks/', include('data.marks.urls')),
    (r'^admin/', include('django.contrib.admin.urls.admin')),
)
--

It seems like I'd have to create three additional Location sections
(marks, trades, admin) but that kinds of defeats the purpose of the
urls.py file.

BTW, I've never gotten the PythonAutoReload to work either.

Thanks,
-Dave (Apache noob)


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to