On Sat, 2009-05-02 at 21:00 -0700, josebrwn wrote: > Hi, I'm trying to pass the current year the date based view > archive_year using the "url" template tag, and I'm stuck trying to get > the current time to resolve. this works just fine: > > <li><a href="{% url coltrane_entry_archive_year year=2009 %}">{% now > "Y" %}</a></li> > > but this (as well as many variations) > > <li><a href="{% url coltrane_entry_archive_year year=now%}">{% now "Y" > %}</a></li> > > gets: > > NoReverseMatch: Reverse for 'cms.coltrane_entry_archive_year' with > arguments '()' and keyword arguments '{'year': ''}' not found. > > do I need to write a view for this?
It looks like you didn't pass a variable called "now" into the template's context. So it was resolved to the empty string, as noted in the error message. 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---