Source

milton / urls.py

Full commit
from django.conf.urls.defaults import *
from models import Story
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from milton.xmlrpc import view as xmlrpc_view

urlpatterns = patterns('',
    # MetaWeblog access point
    url(r'^api/', csrf_exempt(xmlrpc_view), kwargs={'module':'milton.metaweblog'}),
)

urlpatterns += patterns('milton.views',
    # Comments
    (r'^comments/', include('django.contrib.comments.urls')),
    
    # Front page
    #  Enable this if you want the front page to not be an index of Stories, but a static Page.
    # (r'^$', 'view_page', {'url':'/'}),
    
    # Articles
    url(
        regex  = r'^(?:(?P<section>[^0-9][^/]+)/)?(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>.+)/$',
        view   = 'story_detail',
        name   = "story-detail"
    ),
    url(
        regex  = r'^(?:(?P<section>[^0-9][^/]+)/)?(?:(?P<year>\d{4})/)?(?:(?P<month>\d{1,2})/)?(?:(?P<day>\d{1,2})/)?$',
        view   = 'story_archive',
        kwargs = { "teasers": True },
        name   = "story-archive"
    ),
    
    # Tags
    url(
        regex  = r'^tag/(?P<tagname>.+)/$',
        view   = 'view_tag',
        name   = 'tag',
    )
)

urlpatterns += patterns('milton.views',
    (r'^(?P<url>.*)$', 'view_page'),
)