Source

dotim / dotim / blog / urls.py

Full commit
from django.conf.urls import patterns, url

from . import views
from .feeds import LatestEntries, LatestLangEntries, TagFeed, TagLangFeed

year_re = '(?P<year>\d{4})'
month_re = '(?P<month>[a-z]{3})'
day_re = '(?P<day>\d{2})'

urlpatterns = patterns('',
    url(r'^$', views.index, name='index'),

    url(r'^%(year_re)s/$' % locals(),
        views.year, name='year'),

    url(r'^%(year_re)s/%(month_re)s/$' % locals(),
        views.month, name='month'),

    url(r'^%(year_re)s/%(month_re)s/%(day_re)s/$' % locals(),
        views.day, name='day'),

    url(r'^%(year_re)s/%(month_re)s/%(day_re)s/(?P<slug>[\w-]+)/$' % locals(),
        views.entry, name='entry'),

    # Tags
    url(r'^tags/$', views.tags, name='tags'),
    url(r'^tag/(?P<tag>[\w\.-]+)/$', views.tag, name='tag'),
    url(r'^tag/(?P<tags>[\w\+\.-]+)/$', views.multiple_tags, name='tags'),

    # Feeds
    url(r'^atom/$', views.feeds, name='feeds'),
    url(r'^atom/latest/$',
        LatestEntries(), name='latest_entries_feed'),

    url(r'^atom/(?P<language>[a-z]{2})/latest/$',
        LatestLangEntries(), name='latest_entries_feed'),

    url(r'^atom/tag/(?P<tags>.+)/$',
        TagFeed(), name='tags_feed'),

    url(r'^atom/(?P<language>[a-z]{2})/tag/(?P<tags>.+)/$',
        TagLangFeed(), name='tags_feed'),
)