I've implemented Routes in 2.0.x and we're in the process of getting
the bugs ironed out in that branch ( http://bitbucket.org/turbogears/
tg-2_0/ ).
I've been asked to work on the 2.1.x branch, and get Routes working
there too, but I just haven't had time to look at the 2.1.x branch;
my company uses 2.0.x, so I had to fix Routes there there for us to
get our last application out the door.
Basically, none of the core TG developers/maintainers actually use
Routes. So it's not so much a priority for them and it's up to those
people that need Routes support to implement it.
If anyone feels brave enough to tackle Routes in 2.1.x before I get
there, check out the patches by me (Anthony Theocharis) in the tg-2.0
branch linked to above, and see if you can apply the concepts to 2.1.
There should be even fewer changes required in 2.1, because I think
the code there is already cleaner.
-- Anthony
On 24-Feb-10, at 8:19 AM, Kevin Horn wrote:
Please try to be patient...a lot of the TG people have been at
PyCon and probably aren't checking their mail much at the moment...
I've never really tried to change the routing setup in TG2, but it
looks like the AppConfig method is the way to go, according to the
docs: http://turbogears.org/2.1/docs/main/RoutesIntegration.html?
highlight=routes
Also, check the controller that you are routing to for "/homepage/
test/this". If it's an ObjectDispatchController that may be
causing your problems. See the above docs page for details.
Kevin Horn
On Tue, Feb 23, 2010 at 6:03 PM, Yo'av Moshe <[email protected]> wrote:
Sorry but... Anyone?
I'm thinking *someone* must be using routes in TG2 and can shade some
light... :-(
Yo'av
On Feb 20, 12:38 am, "Yo'av Moshe" <[email protected]> wrote:
> Does it work?
>
> I'm finally trying to convert my website from (TG1.0)TG1.1 to
TG2.1...
> One of the features I'm liking the most is the use of Routes...
But I
> can't get it to work.
>
> I've tried 2 different methods:
> 1 - Put this in my root.py, above my RootController:
>
> def setup_routes(self):
> map = Mapper(directory=config['pylons.paths']['controllers'],
> always_scan=config['debug'])
> map.connect('/homepage/test/this', controller='RootController',
> action="index")
> map.connect('*url', controller='root',
> action='routes_placeholder')
> config['routes.map'] = map
>
> Still, /home/test/this returns 404 (though /index is working fine).
>
> 2 - Adding setup_routes to my AppConfig object in app_cfg.py:
>
> def setup_routes(self):
> map = Mapper(directory=config['pylons.paths']
['controllers'],
> always_scan=config['debug'])
> map.connect(None, '/homepage/test/this',
> controller='root',
> action='index')
> map.connect('*url',
> controller='root',
> action='routes_placeholder')
> config['routes.map'] = map
>
> Still, only /index works and no /homepage/test/this
>
> I've tried setting controller as 'root' as well as 'RootController'
> and 'index'. None of which helped.
>
> What am I missing? When I installed TG2.1 I thought I'd have a
> routes.py file right from the quickstart that I can mess with... :(
>
> I tried searching the group's archive, the above ideas was all I
got..
>
> How can mess with my URLs? :p
>
> Thank you!
> Yo'av
--
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 turbogears
[email protected].
For more options, visit this group at http://groups.google.com/
group/turbogears?hl=en.
--
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 turbogears
[email protected].
For more options, visit this group at http://groups.google.com/
group/turbogears?hl=en.
--
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.