summaryrefslogtreecommitdiffstats
path: root/news/urls.py
blob: d938ef586b974e54938b03bf6b7fb872439d25f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.conf.urls.defaults import patterns

urlpatterns = patterns('news.views',
    (r'^$',                         'news_list', {}, 'news-list'),
    (r'^add/$',                     'add'),
    (r'^preview/$',                 'preview'),
    # old news URLs, permanent redirect view so we don't break all links
    (r'^(?P<object_id>\d+)/$',      'view_redirect'),
    (r'^(?P<slug>[-\w]+)/$',        'view'),
    (r'^(?P<slug>[-\w]+)/edit/$',   'edit'),
    (r'^(?P<slug>[-\w]+)/delete/$', 'delete'),
)

# vim: set ts=4 sw=4 et: