On Aug 30, 2007, at 8:08 PM, Jose Galvez wrote:
ok so if I get it then mapper(':controller/:action', action='index')
will match /main/index but not main. is that correct?
Yep, no more minimizing the URL by leaving off defaults.
- Ben
smime.p7s
Description: S/MIME cryptographic signature
so would adding mapper(':controller', action='index') above
mapper(':controller/:action') map /main as main/index or will there be no
real way to map a controller without an action to the index action?
Jose
On 8/31/07, Ben Bangert [EMAIL PROTECTED] wrote:
On Aug 30, 2007, at 8:08 PM, Jose
On Aug 31, 2007, at 1:02 PM, Jose Galvez wrote:
so would adding mapper(':controller', action='index') above mapper
(':controller/:action') map /main as main/index or will there be
no real way to map a controller without an action to the index action?
That would work just fine. Though I'd
Dear Ben,
In general I agree with you ambiguity is bad, and /user should be different
from /users/index, however users are also lazy, and they have grown
accustomed to being able to type http://somewebsite/ and having that return
a page. so I'm just trying to figure out how to get my users to
On Aug 31, 2007, at 2:25 PM, Jose Galvez wrote:
Dear Ben,
In general I agree with you ambiguity is bad, and /user should be
different from /users/index, however users are also lazy, and they
have grown accustomed to being able to type http://somewebsite/ and
having that return a page. so
Indeed, in Routes 2.0 the behavior you expect will be the default, I
blogged more about other Routes 2.0 and 1.X features:
http://groovie.org/articles/2007/08/29/routes-planning-and-the-road-to-routes-2-0
Cool!
Apart from clearing name route confusion, I noticed you plan to solve
another
Ben I took a look at your link and I'm confused. When you say *Routes
recognition and generation will always be explicit* does this mean
that the mapper mapper(':controller/:action/:id' action='index') will
not match /main as /main/index
Jose
Ben Bangert wrote:
On Aug 28, 2007, at 2:00 AM,
On Aug 30, 2007, at 6:07 PM, Jose Galvez wrote:
Ben I took a look at your link and I'm confused. When you say
*Routes
recognition and generation will always be explicit* does this mean
that the mapper mapper(':controller/:action/:id' action='index') will
not match /main as /main/index
It
ok so if I get it then mapper(':controller/:action', action='index')
will match /main/index but not main. is that correct?
Jose
Ben Bangert wrote:
On Aug 30, 2007, at 6:07 PM, Jose Galvez wrote:
Ben I took a look at your link and I'm confused. When you say *Routes
recognition and generation
On Aug 28, 2007, at 2:00 AM, Marcin Kasperski wrote:
(after additional reconsideration)
I think that the - with respect to the current behaviour - whole
term 'named route' and mapper syntax is misleading.
Indeed, in Routes 2.0 the behavior you expect will be the default, I
blogged more
(after additional reconsideration)
I think that the - with respect to the current behaviour - whole
term 'named route' and mapper syntax is misleading.
Let's once more take a look at the original example:
from routes import *
m = Mapper()
m.connect('gallery_thumb',
Ben Bangert [EMAIL PROTECTED] writes:
On Aug 24, 2007, at 2:56 AM, Dan Korostelev wrote:
Yeah, I also worked around the problem this way, but I don't like
it. Looks like there's a bug in Routes. Thanks for information.
There's no bug in routes, this is exactly how it works, and how the
On Aug 27, 2007, at 2:27 AM, Marcin Kasperski wrote:
OK, so it is a bug by design.
Take a look at the original example, and spend a minute thinking
whether the routes behaviour in this case is what would one expect.
And ... so how should be this very case solved?
It's not a bug by design,
m.connect('gallery_thumb',
'images/gallery/:(image_id)_:(image_size).jpg', image_size='thumbnail')
m.connect('gallery', 'images/gallery/:(image_id).jpg')
Well, that's generally the same trick as discussed earlier as a
workaround - forcing parameter difference (here - extra param). I do
On Aug 27, 2007, at 9:20 AM, Marcin Kasperski wrote:
Well, that's generally the same trick as discussed earlier as a
workaround - forcing parameter difference (here - extra param). I do
not understand why named routes works the way you describe. Does there
exist any case when one wants to
On 8/27/07, Ben Bangert [EMAIL PROTECTED] wrote:
On Aug 27, 2007, at 9:20 AM, Marcin Kasperski wrote:
Well, that's generally the same trick as discussed earlier as a
workaround - forcing parameter difference (here - extra param). I do
not understand why named routes works the way you
On Aug 27, 2007, at 10:42 AM, Neil Blakey-Milner wrote:
I'd use it. I've run into this problem twice (and totally forgot how
I solved it the first time), and I've had one of my developer
colleagues come to me with the same problem as well.
We almost exclusively use named routes - I think
On Aug 24, 2007, at 2:56 AM, Dan Korostelev wrote:
Yeah, I also worked around the problem this way, but I don't like
it. Looks like there's a bug in Routes. Thanks for information.
There's no bug in routes, this is exactly how it works, and how the
docs indicate it works. From the docs
Hello!
I have a problem with named routes. I defined two routes with different
names and same dynamic part. Now, when I'm using url_for to generate an url
for one of the routes, it just use the first connected route, independently
on the specified name. Like this:
from routes import *
m =
Yeah, I also worked around the problem this way, but I don't like it. Looks
like there's a bug in Routes. Thanks for information.
On 8/24/07, Marcin Kasperski [EMAIL PROTECTED] wrote:
from routes import *
m = Mapper()
m.connect('gallery_thumb',
'images/gallery/:(image_id)_thumbnail.jpg')
from routes import *
m = Mapper()
m.connect('gallery_thumb', 'images/gallery/:(image_id)_thumbnail.jpg')
m.connect('gallery', 'images/gallery/:(image_id).jpg')
url_for('gallery_thumb', image_id=1)
'/images/gallery/1_thumbnail.jpg'
url_for('gallery', image_id=1)
21 matches
Mail list logo