On Sat, 2007-11-10 at 11:02 +0000, [EMAIL PROTECTED] wrote: > > No. This one's a case or pilot error. If you want to use this form, you > > must write it as: > > > > url(r'^$', 'index', name="blog-index") > > > > url() is a function call, so you can pass it named arguments. The (...) > > form (without a leading "url") is a Python tuple and you can't use > > 'name=value' style arguments and it must have four arguments. Best to > > stick to the url() form. > > > > By the way, you can test whether things are working at the interactive > > prompt using reverse(), which is how the url template tag is > > implemented: > > Thanks you two, I hadn't caught on that it was going from a tuple to > an actual function. > > reverse('index') gets me NoReverseMatch, which isn't surprising given > that my urls aren't working. I'm going to do some tidying and make > sure nothing's escaped me.
I would suggest commenting out every line from your urlpatterns except the one you are debugging. That way you won't be accidentally sabotaged by a problem elsewhere. As has been pointed out here recently, URL configuration either works or it doesn't: if you have a bug somewhere, such as a non-existent view, the whole thing falls over. That will be fixed tomorrow, probably -- I'm going to sit down and spend a day closing bugs and that's on my list. Malcolm -- Many are called, few volunteer. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---