Skip to content
Browse files

better handing of environ

  • Loading branch information...
1 parent 3d67f11 commit 42ebc3ef866cd96101f4e5a435a869313fb08560 zebuline committed Apr 20, 2009
Showing with 7 additions and 11 deletions.
  1. +1 −1 setup.py
  2. +6 −10 src/dj/paste/paste/__init__.py
View
2 setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os
-version = '1.2'
+version = '1.3'
def read(rnames):
setupdir = os.path.dirname( os.path.abspath(__file__))
View
16 src/dj/paste/paste/__init__.py
@@ -4,8 +4,6 @@
from webob import Request, exc
-from paste.deploy.config import ConfigMiddleware
-
import pkg_resources
dv = pkg_resources.working_set.by_key.get('django').version
MIN_VERSION = '1.0.3'
@@ -26,15 +24,11 @@ def django_factory(global_config, **local_config):
"""
A paste.httpfactory to wrap a django WSGI based application.
"""
+ print "called"
+ apps = {}
log = logging.getLogger('dj.paste')
conf = global_config.copy()
conf.update(**local_config)
- dmk = 'django_settings_module'
- dsm = local_config.get(dmk, '').strip()
- os.environ['DJANGO_SETTINGS_MODULE'] = dsm
- if dmk in local_config:
- del local_config[dmk]
- app = ConfigMiddleware(WSGIHandler(), conf)
debug = False
if global_config.get('debug', 'False').lower() == 'true':
debug = True
@@ -45,9 +39,11 @@ def null_500_response(request, exc_type, exc_value, tb):
raise exc_type, exc_value, tb
from django.views import debug
debug.technical_500_response = null_500_response
-
+ dmk = 'django_settings_module'
+ dsm = local_config.get(dmk, '').strip()
+ app = WSGIHandler()
def django_app(environ, start_response):
- #environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
+ print dsm
os.environ['DJANGO_SETTINGS_MODULE'] = dsm
req = Request(environ)
try:

0 comments on commit 42ebc3e

Please sign in to comment.
Something went wrong with that request. Please try again.