]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/urls.py
73137930f7948749e5578e9f9a495046bcff7fe3
[sommitrealweird.git] / sommitrealweird / urls.py
1 from django.urls import include, re_path
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     re_path(r'^$', bpcms.views.document_view, {'slug': 'index'}),
27     re_path(r'^media/(?P<path>.*)$', django.views.static.serve, {'document_root': MEDIA_ROOT, 'show_indexes': True}),
28     re_path(r'^static/(?P<path>.*)$', django.views.static.serve, {'document_root': STATIC_ROOT, 'show_indexes': True}),
29     re_path(r'^admin/', admin.site.urls),
30     re_path(r'^blog/', include('blog.urls')),
31     re_path(r'^photo/', include('photo.urls')),
32     #url(r'^photos/', include('photo.urls')),
33     re_path(r'^css-doc/(?P<slug>.*)$', bpcms.views.css_view),
34     re_path(r'^feeds/rss/blog/', LatestBlogEntriesRss()),
35     re_path(r'^feeds/blog/', LatestBlogEntries()),
36     re_path(r'^', include('bpcms.urls'))
37 ]