\w not include *, try use (.*)
--
blog: http://chenxiaoyu.org  twitter: @nnfish <http://twitter.com/nnfish>



On Tue, Oct 12, 2010 at 10:29 PM, mf <mf2...@gmail.com> wrote:

> 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**/ <http://mysite.com/%0Aweblog/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>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to