]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/urls.py
Changes for django 2.2
[sommitrealweird.git] / sommitrealweird / urls.py
1 from django.conf.urls import include, url
2 from django.conf.urls.static import static
3 import bpcms.views
4 import django.views.static
5 from settings import MEDIA_ROOT, MEDIA_URL, STATIC_ROOT, STATIC_URL
6 from blog.feeds import LatestBlogEntries, LatestBlogEntriesRss
7 from django.contrib import admin
8
9 handler404 = 'generic.views.render_404'
10
11 feeds_dict = {
12     'blog': LatestBlogEntries,
13     }
14
15 rssfeeds_dict = {
16     'blog': LatestBlogEntriesRss,
17     }
18
19 admin.autodiscover()
20
21 urlpatterns = [
22     # Example:
23     # (r'^sommitrealweird/', include('sommitrealweird.foo.urls')),
24
25     # Uncomment this for admin:
26     url(r'^$', bpcms.views.document_view, {'slug': 'index'}),
27     url(r'^media/(?P<path>.*)$', django.views.static.serve, {'document_root': MEDIA_ROOT, 'show_indexes': True}),
28     url(r'^static/(?P<path>.*)$', django.views.static.serve, {'document_root': STATIC_ROOT, 'show_indexes': True}),
29     url(r'^admin/', admin.site.urls),
30     url(r'^blog/', include('blog.urls')),
31     url(r'^photo/', include('photo.urls')),
32     #url(r'^photos/', include('photo.urls')),
33     url(r'^css-doc/(?P<slug>.*)$', bpcms.views.css_view),
34     url(r'^feeds/rss/blog/', LatestBlogEntriesRss()),
35     url(r'^feeds/blog/', LatestBlogEntries()),
36     url(r'^', include('bpcms.urls'))
37 ]