| 1 |
# vim: encoding=utf-8 : |
|---|
| 2 |
|
|---|
| 3 |
from django.conf.urls.defaults import * |
|---|
| 4 |
from blog.feeds import LatestEntries |
|---|
| 5 |
|
|---|
| 6 |
feeds = { |
|---|
| 7 |
'latest': LatestEntries, |
|---|
| 8 |
} |
|---|
| 9 |
|
|---|
| 10 |
urlpatterns = patterns('blog.views', |
|---|
| 11 |
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-_0-9a-zA-Z]+)/trackback/$', |
|---|
| 12 |
'trackback_create', |
|---|
| 13 |
name='blog_trackback_create'), |
|---|
| 14 |
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-_0-9a-zA-Z]+)/$', |
|---|
| 15 |
'entry_detail', |
|---|
| 16 |
name='blog_entry_detail'), |
|---|
| 17 |
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', |
|---|
| 18 |
'archive_day', |
|---|
| 19 |
name='blog_archive_day'), |
|---|
| 20 |
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$', |
|---|
| 21 |
'archive_month', |
|---|
| 22 |
name='blog_archive_month'), |
|---|
| 23 |
url(r'^(?P<year>\d{4})/$', 'archive_year', name='blog_archive_year'), |
|---|
| 24 |
url(r'^detail/(?P<obj_id>\d+)/$', 'entry_from_id', name='blog_entry_from_id'), |
|---|
| 25 |
url(r'^search/(?P<query>.+)/$', 'entry_search', name='blog_entry_search_keyword'), |
|---|
| 26 |
url(r'^search/$', 'entry_search', name='blog_entry_search_query'), |
|---|
| 27 |
url(r'^tag/(?P<label>.+)/$', 'entry_tag', name='blog_entry_tag'), |
|---|
| 28 |
url(r'^$', 'entry_list', name='top_page'), |
|---|
| 29 |
) |
|---|
| 30 |
|
|---|
| 31 |
urlpatterns += patterns('django.contrib.syndication.views', |
|---|
| 32 |
url(r'^feeds/(?P<url>\w+)/$', 'feed', {'feed_dict': feeds}, name='blog_entry_feeds'), |
|---|
| 33 |
) |
|---|