DJANGO In urls.py # urls like "articles/2011/tutorial03" or "articles/2011/tutorial03.html" urlpatterns = patterns('', (r'articles/(?P<year>\d+)/(?P<item>\w+)(\.htm(l)?)?$', 'articles.views.detail'), )