Changeset 4698
- Timestamp:
- 06/10/08 15:09:13 (5 months ago)
- Files:
-
- trunk/docs/index.rst (modified) (1 diff)
- trunk/tg/controllers.py (modified) (2 diffs)
- trunk/tg/render.py (added)
- trunk/tg/tests/test_tg_controller_dispatch.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docs/index.rst
r4633 r4698 3 3 ========================== 4 4 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 begin ing 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.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 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. 6 6 7 7 TurboGears 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 91 91 # Validate user input 92 92 params = self._perform_validate(controller, params) 93 93 94 pylons.c.form_values = params 94 95 … … 348 349 url_path = pylons.request.path.split('/')[1:] 349 350 else: 350 url_path = url.split('/') 351 351 url_path = url.split('/') 352 352 353 controller, remainder = _object_dispatch(self, url_path) 353 354 # XXX Place controller url at context temporarily... we should be trunk/tg/tests/test_tg_controller_dispatch.py
r4339 r4698 117 117 assert isinstance(b, unicode) 118 118 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) 119 124 120 125 class TestTGController(TestWSGIController): … … 205 210 resp = self.app.get('/flash_status') 206 211 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