Malcolm:

What you have described is accurate - my application did indeed just
pick one, selecting the first (empty) regex, and routing me back to
the page I was already on (in one particular case). No error was
thrown - the behavior was just not as I expected. It was only during
my attempts to use reverse( ) as a debugging mechanism that the error
messages appeared.

What is this "free time" you speak of?

Thanks,
dan

On Nov 23, 8:17 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-11-23 at 12:42 -0700, Dj Gilcrease wrote:
> > You should not have both;
> > (r'^$',          include('basicBlog.blog.urls')),
> > (r'^blog/',      include('basicBlog.blog.urls')),
>
> > since now your reverse is going to match two diffrent URL,
> > /2008/nov/21/secondPost/
> > and
> > /blog/2008/nov/21/secondPost/
> > thus cause the NoReverseMatch error since reverse should match one and
> > only one url
>
> Hmmm. Since that resolved the original poster's problem, it's got me
> worried. This shouldn't be the case. Sometimes there will be more than
> URL directing to exactly the same view and set of variables. It's a bit
> messy (redirects would work better), but it's not inconceivable and not
> really wrong, per se. Reversing those patterns should just pick one and
> move on. Either one would be correct.
>
> Note that this is what already happens if you have a pattern like
>
>         '/foo/[abc]/(\w+)'
>
> for example. Reversing that will always give '/foo/a/...', although
> '/foo/b/...' and '/foo/c/...' would also be correct. The point is, we
> just pick one. The caller doesn't get to choose, since they've said all
> the patterns were equivalent.
>
> Thus, this is a bug in reverse(), possibly. So now I have to do more
> work and fix it. I remember when I used to have free time. My
> recollection is that those were happier days. :-(
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to