On Jul 30, 5:23 am, adam <[email protected]> wrote:
> with some frameworks you can submitt information in the url like
>
> www.example.com/homepage/index
Above your controller, you can do something like:
def setup_routes(self):
map = Mapper(directory=config['pylons.paths']['controllers'],
always_scan=config['debug'])
map.connect('homepage/:pagename', controller='homepage')
map.connect('error/:action/:id', controller='error')
map.connect('*url', controller='root',
action='routes_placeholder')
config['routes.map'] = map
class RootController(BaseController):
@expose('cp.templates.template')
def homepage(self, pagename):
http://turbogears.org/2.0/docs/modules/thirdparty/routes.html
you might also reference the RestController
http://turbogears.org/2.0/docs/modules/tgcontroller.html
http://turbogears.org/2.0/docs/main/RestControllers.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---