]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/urls.py
b709acced792c93e27330fea820be3f1576d06d8
[sommitrealweird.git] / sommitrealweird / urls.py
1 from django.conf.urls.defaults import *
2 from settings import MEDIA_ROOT, MEDIA_URL
3 from blog.feeds import LatestBlogEntries
4
5 handler404 = 'generic.views.render_404'
6
7 feeds_dict = {
8     'blog': LatestBlogEntries,
9     }
10
11 urlpatterns = patterns('',
12     # Example:
13     # (r'^sommitrealweird/', include('sommitrealweird.foo.urls')),
14
15     # Uncomment this for admin:
16     (r'^$', 'bpcms.views.document_view', {'slug': 'index'}),
17     (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT, 'show_indexes': True}),
18     (r'^admin/', include('django.contrib.admin.urls')),
19     (r'^blog/', include('blog.urls')),
20     (r'^feeds/(?P<url>.*)/', 'django.contrib.syndication.views.feed', {'feed_dict': feeds_dict}),
21     (r'^(?:content/|)(?P<slug>[^/]+)/$', 'bpcms.views.document_view'),
22     (r'^(?:content/|)(?P<folders>.*)/(?P<slug>[^/]+)/$', 'bpcms.views.document_view'),
23 )