On 2014-05-20 09:00, uralbash wrote:
Hello,
I'm trying to go to home page (http://localhost:6543/) through
traversal. What should be the key of context to traversal choice it?
Root is not a key in the dict: the dict object itself is root (context).
So the root is a dict - or dict-like - and all 'contained' are fetched
by calling __getitem__ on root (and for subpaths on the subobjects, it's
a tree).
HTH Jens
config.add_route('pages_view', '/*traverse',
factory='sacrud_pages.routes.root_factory')
My context {'': <About company>, 'foo12': <foo12>}
1) http://localhost:6543/ - not choice <About company>
>>> PATH_INFO = '/'
>>> PATH_INFO.split('/')
['', '']
2) http://localhost:6543/foo12 - It OK (choice foo12)
>>> PATH_INFO = '/foo12'
>>> PATH_INFO.split('/')
['', 'foo12']
--
Klein & Partner KG, member of BlueDynamics Alliance
--
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 pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.