Changeset 3757

Show
Ignore:
Timestamp:
11/24/07 23:10:53 (1 year ago)
Author:
mramm
Message:

Adding session, caching, and ToscaWidget? support to the default TG app.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/setup.py

    r3653 r3757  
    2424        'Pylons', 
    2525        'Genshi>=0.4', 
    26         'SQLAlchemy>=0.4' 
     26        'SQLAlchemy>=0.4', 
     27        'ToscaWidgets>=0.2rc1' 
    2728    ], 
    2829    extras_require={ 
  • trunk/tg/templates/turbogears/+package+/config/middleware.py_tmpl

    r3653 r3757  
    1111from beaker.middleware import SessionMiddleware, CacheMiddleware 
    1212from tg import TurboGearsApplication 
     13from toscawidgets.middleware import TGWidgetsMiddleware 
     14from toscawidgets.mods.pylonshf import PylonsHostFramework 
    1315 
    14 from ${package}.config.environment import load_environment 
    15 from ${package}.controllers.root import RootController 
     16 
     17from  ${package}.config.environment import load_environment 
     18from  ${package}.controllers.root import RootController 
    1619 
    1720def make_app(global_conf, full_stack=True, **app_conf): 
     
    3538    # Configure the Pylons environment 
    3639    load_environment(global_conf, app_conf) 
    37  
    38     # The Pylons WSGI app 
     40     
     41    # Create the TurboGears WSGI app stack 
    3942    app = TurboGearsApplication(RootController()) 
    40  
     43     
     44    # Add Session and Cashing support  
    4145    app = SessionMiddleware(app, config) 
    4246    app = CacheMiddleware(app, config) 
     47     
     48    #Configure and add ToscaWidgets support  
     49    host_framework = PylonsHostFramework(default_view="genshi") 
     50    app = TGWidgetsMiddleware(app, host_framework) 
    4351 
    4452    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)