-
Notifications
You must be signed in to change notification settings - Fork 1
/
urls.py.tmpl
31 lines (27 loc) · 1.08 KB
/
urls.py.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from django.conf import settings # Development only
from django.conf.urls.defaults import *
from apps.blog.feeds import BlogEntryFeed
from sitemaps import BlogSitemap
from django.contrib.comments.feeds import LatestFreeCommentsFeed
from django.contrib.comments.models import FreeComment
comments_dict = {
'queryset': FreeComment.objects.all(),
'paginate_by': 15,
}
feeds_dict = {
'blog': BlogEntryFeed,
}
sitemaps = {
'blog': BlogSitemap,
}
urlpatterns = patterns('',
(r'^$', include('becca.apps.blog.urls')),
(r'^admin/', include('django.contrib.admin.urls')),
(r'^blog/', include('becca.apps.blog.urls')),
(r'^comments/$', 'django.views.generic.list_detail.object_list', comments_dict),
(r'^comments/', include('django.contrib.comments.urls.comments')),
(r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds_dict}),
(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
# Development only
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)