-
-
Notifications
You must be signed in to change notification settings - Fork 944
/
urls.py
43 lines (38 loc) · 1.67 KB
/
urls.py
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
32
33
34
35
36
37
38
39
40
41
42
43
from django.conf.urls.defaults import *
from django.contrib.comments.feeds import LatestFreeCommentsFeed
from django.contrib.comments.models import FreeComment
from django_website.apps.aggregator.feeds import CommunityAggregatorFeed
from django_website.apps.aggregator.models import FeedItem
from django_website.apps.blog.feeds import WeblogEntryFeed
from django_website.sitemaps import FlatPageSitemap, WeblogSitemap, DocumentationSitemap
comments_info_dict = {
'queryset': FreeComment.objects.all(),
'paginate_by': 15,
}
aggregator_info_dict = {
'queryset': FeedItem.objects.select_related(),
'paginate_by': 15,
}
feeds = {
'weblog': WeblogEntryFeed,
'comments': LatestFreeCommentsFeed,
'community': CommunityAggregatorFeed,
}
sitemaps = {
'weblog': WeblogSitemap,
'docs': DocumentationSitemap,
'flatpages': FlatPageSitemap,
}
urlpatterns = patterns('',
(r'^weblog/', include('django_website.apps.blog.urls')),
(r'^documentation/', include('django_website.apps.docs.urls')),
(r'^comments/$', 'django.views.generic.list_detail.object_list', comments_info_dict),
(r'^comments/', include('django.contrib.comments.urls.comments')),
(r'^community/$', 'django.views.generic.list_detail.object_list', aggregator_info_dict),
(r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
(r'^password_reset/', include('django.conf.urls.admin_password_reset')),
(r'^r/', include('django.conf.urls.shortcut')),
(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
(r'^admin/', include('django.contrib.admin.urls')),
(r'', include('django.contrib.flatpages.urls')),
)