Using the following template tag resolved the issue: {% url archive_month obj.year obj|date:"b" %}
On Oct 7, 9:04 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I'm using the generic date-based views. > > Here's a snippet of my "Entry" model for a blog: > > #models.py > pub_date = models.DateTimeField(auto_now_add=True) > > @models.permalink > def get_month_entries(self): > return ('archive_month', (), { > 'year' : self.pub_date.strftime("%Y"), > 'month' : self.pub_date.strftime("%b").lower() > }) > > Here are my URL patterns: > > #urls.py > url(r'^blog/(?P<year>\d{4})/(?P<month>\w{3})/$', 'archive_month', > entry_info_dict, name='archive_month') > > archive_month returns me a date_list object, which I'm iterating over > and displaying months: > > {% for date in date_list %} > <li> > <a href="{{ get_month_entries }}" title="View articles for {{ date| > date:"F" }} {{ year }}">{{ date|date:"F" }}</a> > </li> > {% endfor %} > > But, when I view my template, only the year is in the link: > > http://localhost/blog/2008/ > > instead of > > http://localhost/blog/2008/oct/ > > Can someone see what I'm doing wrong? > > TIA, > Brandon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---