I've changed the language-code from en-us to es-ar and the url's began to fail. Example: When I click in "Agosto 2010" the URL is "http://mysite.com/weblog/2010/ago/" and the server couldn't finde the page. But if I browse "http://mysite.com/weblog/2010/aug/ the server finds and shows the page.
urls.py:
urlpatterns = patterns('django.views.generic.date_based',
(r'^$', 'archive_index', entry_info_dict, 'coltrane_entry_archive_index'),
(r'^(?P<year>\d{4})/$', 'archive_year', entry_info_dict,
'coltrane_entry_archive_year'),
(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', 'archive_month', entry_info_dict,
'coltrane_entry_archive_month'),
)
templatetags.py:
@register.inclusion_tag('coltrane/month_links_snippet.html')
def render_month_links():
return {
'dates': Entry.objects.dates('pub_date', 'month'),
}
month_links_snippet.html:
<ul>
{% for d in dates reversed %}
<li><a href="/weblog/{{ d|date:"Y/b" }}/">{{ d|date:"F Y" }}</a></li>
{% endfor %}
</ul>