On Apr 19, 7:38 pm, mh...@yahoo.com wrote:
> I'm fairly new to django so hopefully its something simple I'm missing
> - I've tried setting up 2 separate projects(both are fairly simple)
>
> The problem I'm having is, after restarting apache2
> I can point my browser to:http://98.232.251.252/stockdata/   and everything 
> works
> I can point my browser to:http://98.232.251.252/listing/   and everything 
> works
>
> but when I tryhttp://98.232.251.252/stockdata/again, I get an error
>
> Using the URLconf defined in gardners.urls, Django tried these URL
> patterns, in this order:
>
>    1. ^listing/$
>    2. ^image/$
>
> The current URL, stockdata/, didn't match any of these.
>
> Its looking at the wrong urls.py file or settings
>
> Using the URLconf defined in gardners.urls, Django tried these URL
> patterns, in this order:
>
>    1. ^listing/$
>    2. ^image/$
>
> The current URL, stockdata/, didn't match any of these.
>
> It will work again if I restart apache2
> Here's my httpd.conf file
>
> m...@mhj-laptop:/etc/apache2$ cat httpd.conf
> <Location "/stockdata/">
>     SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     PythonPath "[r'/home/mhj/python/django', r'/home/mhj/python/django/
> stockanal'] + sys.path"
>     SetEnv DJANGO_SETTINGS_MODULE stockanal.settings
>     PythonOption django.root /stockanal
>     PythonDebug Off
> </Location>
>
> #<Location "/gardners/">
> <Location "/listing/">
>     SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     PythonPath "[r'/home/mhj/python/django', r'/home/mhj/python/django/
> gardners'] + sys.path"
>     SetEnv DJANGO_SETTINGS_MODULE gardners.settings
>     PythonOption django.root /gardners
>     PythonDebug Off
> </Location>
>
> Thanks, Marsh

You should read this bit of the documentation:
http://docs.djangoproject.com/en/1.1/howto/deployment/modpython/#howto-deployment-modpython
As described there, you should use the PythonInterpreter directive to
distinguish between the two sites.

I wonder though if you really need to have these as two separate
Django instances? Is there a reason why they can't be part of the same
site? In any case, you probably should be using mod_wsgi rather than
mod_python.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to