On Sep 5, 7:50 pm, Siddhi <[EMAIL PROTECTED]> wrote:
> On Aug 29, 5:26 pm, Masida <[EMAIL PROTECTED]> wrote:
>
> > Hi Siddharta,
>
> > Assuming you're deploying on Apache with mod_python, have you tried
> > setting ServerName in your httpd.conf to someting sensible?
>
> Hi Mathias,
>
> The app is being deployed using Toolserver for Python and it's hooking
> up to Django via WSGI. The deployment scenario is that each team will
> run the app on a team computer that will be accessed by 10-20 people
> in the team via the IP address.
If you are using WSGI interface to Django, then all you need to do is
wrap Django in a simple WSGI application wrapper that overrides
SERVER_NAME and sets it to what you want. For example:
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
_application = django.core.handlers.wsgi.WSGIHandler()
def application(environ, start_response):
environ['SERVER_NAME'] = environ['HTTP_HOST']
return _application(environ, start_response)
If you don't understand WSGI and how this works, check out 'http://
www.wsgi.org'.
Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---