2008/9/17 Milan Andric <[EMAIL PROTECTED]>:
>
>
> On Tue, Sep 16, 2008 at 3:01 PM, Walter Cruz <[EMAIL PROTECTED]> wrote:
>>
>> Does someone have a problem with django in a subdir, trailing slashs
>> and other things?
>>
>> I have a deploy like that:
>>
>> WSGIScriptAlias /walter
>> /home/walter/django_projects/walter_django/walter.wsgi
>>
>> My wsgi file:
>>
>>
>> import os, sys
>> sys.path.append('/home/walter/django_projects/walter_django')
>> os.environ['DJANGO_SETTINGS_MODULE'] = 'walterproject.settings'
>>
>> import django.core.handlers.wsgi
>>
>> _application = django.core.handlers.wsgi.WSGIHandler()
>>
>> def application(environ, start_response):
>>    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
>>    return _application(environ, start_response)
>>
>> If i run in django development server, a request to
>> http://server/walter is redirected to http://server/walter and it
>> works ok. the same happens to http://server/walter/admin, that is
>> redirected to http://server/walter/admin/ and works ok.
>>
>> But, running on apache, http://server/walter don't work. and
>> http://server/walter/admin is redirected to
>> http://server/walter/walter/admin
>>
>> Can someone help me?
>>
>> []'s
>> - Walter
>
>
> I'm using Django but I don't need the  environ['PATH_INFO'] =
> environ['SCRIPT_NAME'] + environ['PATH_INFO']  line.  I once had a problem
> with the trailing slash but that was a problem with a specific application
> (flatpages) and there was a patch submitted shortly after.  So another thing
> you might check is your version of django.

You do not need the PATH_INFO fiddle if you are mounting Django at
root of web server, or if using Django 1.0.

In other words, fiddle is required for pre Django 1.0 but only when
mounting at sub URL.

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to modwsgi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to