Found this thread on the same topic
http://groups.google.com/group/django-users/browse_frm/thread/7a2d69fa8748ba68
..but it got closed.

I want to do the same things as the OP in that thread:
> I've recently completed a first milestone of a project and want to
> publish it.  I've got two URLs: www.mydomain.com and dev.mydomain.com.
> I'm not too concerned if dev is public, I just don't want to break the
> production website while I'm developing.
>
> What's the best way to handle this?

The difference between what I'm trying to do and the OP in that thread
is (apparently) that I've got different databases for each subdomain.
The problem I'm having is that the www domain is using the settings for
the test domain, and ends up pulling from its database.  At this point,
I can't tell if I'm having an apache config problem, a mod_python
directive problem, or a django problem.

The relevant portions of my two vhost definitions:

<VirtualHost *>
  ServerName test.mysite.com
  <Location />
    ### setup django stuff
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    PythonAutoReload On
    PythonDebug On
    PythonPath "['/home/django-code/test.mysite.com/'] + sys.path"
    PythonInterpreter mysite-test
  </Location>
</VirtualHost>

<VirtualHost *>
  ServerName mysite.com
  ServerAlias www.mysite.com
  <Location />
    ### setup django stuff
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    PythonDebug Off
    PythonPath "['/home/django-code/www.mysite.com/'] + sys.path"
    PythonInterpreter mysite-www
  </Location>
</VirtualHost>

www settings file: /home/django-code/www.mysite.com/mysite/settings.py
test settings file:
/home/django-code/test.mysite.com/mysite/settings.py
PYTHONPATH doesn't contain any references to either (only base Python
components & locations)

I've double-checked each settings.py file and verified that the DB info
is in fact different, so it's nothing that obvious (at least to me).  I
suspect that my issue isn't Django related at all, but I couldn't be
sure.  I didn't *think* that the sites angle (as covered in the
original thread) was relevant to my situation, since I've got
completely separate databases for each.  Any pointers?


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