On Wed, Mar 11, 2009 at 1:41 AM, Tokyo Dan <[email protected]>wrote:
> > Karen, you made me feel real stupid. BUT I LOVE YOU! > > I read that over and over and couldn't see it. Also I didn't know what > the heck "group name" meant. > Well, that Python exception message might could have been nicer and specified what character, exactly, was "bad" in what group name, exactly. That probably would have helped you out. And the issue with any errors in url patters getting reported on the first attempt to reverse any url pattern tends to be confusing. It's understandable when you think about what the reversal code has to do, but it does rather get people started out looking at the wrong thing (i.e. admin and the admindocs app) when actually the problem lies elsewhere. Django's url pattern matching relies heavily on Python's regular expression support. It's nice one can make use of it without having to get fully up-to-speed on the Python re module but that can make debugging more difficult when you don't have a solid understanding of the underlying facility. Now that's not way past the time when I should have been asleep I did find the doc for this -- If you search for "group name" on this page: http://docs.python.org/library/re.html#regular-expression-syntax you'll recognize the syntax you're using to pass named arguments into views. And see that it does specify that the group name must be a valid Python identifier. Which is good as you consider if you tried to define a matching view for the url pattern with a dot in the group name: def object_detail(request, object.id): you'd get a syntax error.... Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

