Here is my urls.py:

urlpatterns = patterns('',

    # Admin's

    (r'^admin/filebrowser/', include('filebrowser.urls')),

    (r'^admin/', include(admin.site.urls)),

    (r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',

        { 'document_root': os.path.join(settings.MEDIA_ROOT,
> 'tinymce/jscripts/tiny_mce') }),


>     # Media

    (r'^media/(?P<path>.*)$', 'django.views.static.serve',

        { 'document_root': settings.MEDIA_ROOT }),

)


> urlpatterns += patterns('news.views',

    # Categories

    (r'^(?P<lang_name>[a-z]{2})/categories/$', 'category_list',

        {}, 'news_category_list'),

    (r'^(?P<lang_name>[a-z]{2})/categories/(?P<slug>[-\w]+)/$',
> 'category_detail',

        {}, 'news_category_detail'),


>     # news entries

    (r'^(?P<lang_name>[a-z]{2})/news/$', 'entry_archive',

        {}, 'news_entry_archive_index'),

    (r'^(?P<lang_name>[a-z]{2})/(?P<year>\d{4})/$', 'entry_archive_year',

        {}, 'news_entry_archive_year'),

    (r'^(?P<lang_name>[a-z]{2})/(?P<year>\d{4})/(?P<month>\w{3})/$',
> 'entry_archive_month',

        {}, 'news_entry_archive_month'),


>  
> (r'^(?P<lang_name>[a-z]{2})/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$',
> 'entry_archive_day',

        {}, 'news_entry_archive_day'),


>  
> (r'^(?P<lang_name>[a-z]{2})/(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
> 'entry_detail',

        {}, 'news_entry_detail'),

)


But when I try to access http://127.0.0.1:8000/en/categories/ it asks for
entry_archive_day view, matches wrong pattern.

And when I comment out that pattern url matches with entry_archive_month
view pattern. If I try to comment out that one too, it'll match with
entry_archive_year. And then I try to comment out the last one too, it'll
match with entry_archive. After commenting out the latter one, I'll get
expected result: it'll match with category_list view pattern.

I've tried to change places of patterns. I've also tried to separate
categories and entries url pattern lists. No result.

I've tried it on another machine too. Same result.

thanks in advance,
Ali

-- 
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.

Reply via email to