Commits

Anonymous committed af41295

Incorporate SCRIPT_NAME into PATH_INFO for wsgi.

  • Participants
  • Parent commits 46cb04b

Comments (0)

Files changed (3)

File rietveld.wsgi

 import django.core.handlers.wsgi
 import gae2django
 gae2django.install(server_software='Django')
-application = django.core.handlers.wsgi.WSGIHandler()
+_application = django.core.handlers.wsgi.WSGIHandler()
+def application(environ, start_response):
+    # Django's {%url%} template won't prefix script_name,
+    # so clear it here and put everything in path_info
+    environ['PATH_INFO'] = environ['SCRIPT_NAME']+environ['PATH_INFO']
+    environ['SCRIPT_NAME'] = ''
 
+    #start_response('200 Ok', [('Content-type', 'text/plain')])
+    #return ["\n".join([':'.join((str(k),str(v))) for k,v in environ.items()])]
+
+    return _application(environ, start_response)
+

File rietveld/roundup_helper/urls.py

 from django.contrib import admin
 
 urlpatterns = patterns('',
-        ('python-dev/', 'roundup'),
         ('review/', include('rietveld_helper.urls')),
     )

File rietveld/settings.py

     'django.core.context_processors.request',
 )
 
-ROOT_URLCONF = 'rietveld_helper.urls'
+ROOT_URLCONF = 'roundup_helper.urls'
 
 TEMPLATE_DIRS = (
     os.path.join(os.path.dirname(__file__), 'templates'),