Hi,
I use my own framework since more than ten years and see now that it's
very similar with pyramid, of course with a lot less features. Now
i would like to use a community framework to can share my web
applications and stop to reinvent te wheel (wheel that did not exists
when i began...).
My first question is about routes. I use class based view with a regexp
or direct matching and the name of my module.
views/page1.py
/page2.py
routes = [('/p1', 'page1', ('/p2', 'page2))
page1.py :
class Main(Page):
def __call__(self):
...
return Response
I wonder how i can translate this for pyramid.
For the object Page, it's ok because i already use webob.
I can do like that :
from pyramid.view import view_config
@view_config(route_name='p1')
class Main(Page):
...
config.add_route('p1', '/p1')
config.scan()
But i would like to avoid using decorator to don't need to update all my
files (one for each view) or use add_route + add_view for each route.
I think i need to do my own root_factory, but i could not achieve this.
Or maybe there is a good reason to use decorator ? But i think it's
better to have all routes configuration in the same place...
Any hints for me ?
Thanks and sorry for my bad english...
--
William Dodé
Informaticien Indépendant
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.