Changeset 4698

Show
Ignore:
Timestamp:
06/10/08 15:09:13 (5 months ago)
Author:
mramm
Message:

Updated to add missing render.py There is much more to do on the render update, but this is the start.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/index.rst

    r4633 r4698  
    33========================== 
    44 
    5 TurboGears 2 is a reinvention of the TurboGears project to take advantage of new components, and to provide a fully customizable WSGI (Web Server Gateway Interface) stack.  From the begining TurboGears was designed to be a Full Stack framework built from best of breed components.   As time has gone on new components have been released which improved on the ones in the original TG stack, and the Python web world has been increasingly designed around WSGI.  This has enabled a whole new world of component reuse, and TG2 is designed to take advantage of this fact in order to make a framework which is both flexible, and productive. 
     5TurboGears 2 is a reinvention of the TurboGears project to take advantage of new components, and to provide a fully customizable WSGI (Web Server Gateway Interface) stack.  From the beginning TurboGears was designed to be a Full Stack framework built from best of breed components.   As time has gone on new components have been released which improved on the ones in the original TG stack, and the Python web world has been increasingly designed around WSGI.  This has enabled a whole new world of component reuse, and TG2 is designed to take advantage of this fact in order to make a framework which is both flexible, and productive. 
    66 
    77TurboGears 2 is still in rapid development, and should only be used by those who are willing to put up with a little bit of API instability, but because it is well tested, and based on well tested, and known stable components it is already being used by some people in production environments. 
  • trunk/tg/controllers.py

    r4668 r4698  
    9191            # Validate user input 
    9292            params = self._perform_validate(controller, params) 
     93 
    9394            pylons.c.form_values = params 
    9495 
     
    348349            url_path = pylons.request.path.split('/')[1:] 
    349350        else: 
    350             url_path = url.split('/') 
    351  
     351            url_path = url.split('/')  
     352         
    352353        controller, remainder = _object_dispatch(self, url_path) 
    353354        # XXX Place controller url at context temporarily... we should be 
  • trunk/tg/tests/test_tg_controller_dispatch.py

    r4339 r4698  
    117117        assert isinstance(b, unicode) 
    118118        return dict(int=a,str=b) 
     119     
     120    @expose() 
     121    @expose('json') 
     122    def stacked_expose(self, tg_format=None): 
     123        return dict(got_json=True) 
    119124         
    120125class TestTGController(TestWSGIController): 
     
    205210        resp = self.app.get('/flash_status') 
    206211        self.failUnless('status_ok'in resp, resp) 
    207  
     212     
     213    def test_tg_format_param(self): 
     214        resp = self.app.get('/stacked_expose/?tg_format=application/json') 
     215        assert '{"got_json' in resp.body 
     216