Changeset 5129

Show
Ignore:
Timestamp:
08/10/08 16:44:30 (5 months ago)
Author:
mramm
Message:

Some render cleanup.

* pylons.helpers is depricated so we're not importing it anymore
* moved TGApp into a WSGIApp module
* cleaned up some imports

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tg/config.py

    r5127 r5129  
    1111from paste.urlparser import StaticURLParser 
    1212from paste.deploy.converters import asbool 
    13 from pylons import config 
    1413from pylons.middleware import ErrorHandler, StatusCodeRedirect 
    15 from pylons.wsgiapp import PylonsApp 
     14from tg import TGApp 
    1615from routes import Mapper 
    1716from routes.middleware import RoutesMiddleware 
     
    300299            # Configure the Pylons environment 
    301300            load_environment(global_conf, app_conf) 
    302             app = PylonsApp() 
     301            app = TGApp() 
    303302            if wrap_app:  
    304303                wrap_app(app) 
  • trunk/tg/__init__.py

    r5124 r5129  
    5151assumptions about how things will work. 
    5252""" 
     53from tg.wsgiapp import TGApp 
    5354from tg.controllers import TGController, redirect, url, use_wsgi_app 
    5455from tg.decorators import validate, expose, override_template 
    5556from tg.flash import flash, get_flash, get_status 
    5657 
    57 import paste 
    58  
    59 from pylons.wsgiapp import PylonsApp 
    60 from pylons import app_globals, config, request, response, tmpl_context, session 
    61  
    62 TGApp = PylonsApp 
     58from pylons import g, request, response, tmpl_context, session 
    6359 
    6460__all__ = [ 
    6561    'expose', 'validate', 'TGController', 'tmpl_context', 'app_globals', 
    6662    'overide_template', 'request', 'response', 'session','TurboGearsApplication',  
    67     'use_wsgi_app', 'TGApp' 
     63    'use_wsgi_app', 'TGApp', 'app_globals' 
    6864] 
  • trunk/tg/render.py

    r5128 r5129  
    1 from pylons import app_globals, config, helpers, session, tmpl_context, request, response 
     1from pylons import app_globals, config, session, tmpl_context, request, response 
    22import pylons.templating as templating 
    33import tg 
     
    124124        response = response, 
    125125        request = request, 
    126         helpers=helpers, 
    127         h=helpers, 
    128126        tg=tg_vars 
    129127        )