This repository has been archived by the owner on May 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
urls.py
51 lines (37 loc) · 1.77 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
44
45
46
47
48
49
50
51
# -*- coding: utf-8 -*-
"""
Url's map "racine"
"""
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
import autobreadcrumbs
autobreadcrumbs.autodiscover()
from sveedocuments.views.page import (HelpPageView, PageIndexView, PageDetailsView,
PageSourceView, PagePDFView)
urlpatterns = patterns('',
url(r'^$', PageDetailsView.as_view(), {'slug':"accueil"}, name='documents-homepage'),
(r'^admin/', include(admin.site.urls)),
(r'^accounts/', include('sveeaccounts.urls')),
(r'^board/', include('sveedocuments.urls_board')),
url(r'^captcha/', include('captcha.urls')),
(r'^djangocodemirror-sample/', include('djangocodemirror.urls')),
(r'^crispy-forms-foundation/', include('crispy_forms_foundation.urls')),
url(r'^tribune/', include('djangotribune.urls')),
# Mount sveedocuments public ressources
url(r'^documents-help/$', HelpPageView.as_view(), name='documents-help'),
url(r'^sitemap/$', PageIndexView.as_view(), name='documents-index'),
url(r'^(?P<slug>[-\w]+)/$', PageDetailsView.as_view(), name='documents-page-details'),
url(r'^(?P<slug>[-\w]+)/source/$', PageSourceView.as_view(), name='documents-page-source'),
)
# Optional view if RstToPdf is installed
if not getattr(PagePDFView, 'is_dummy', False):
urlpatterns += patterns('',
url(r'^(?P<slug>[-\w]+)/pdf/$', PagePDFView.as_view(), name='documents-page-pdf'),
)
# En production (avec le debug_mode à False) ceci ne sera pas chargé
if settings.DEBUG:
urlpatterns += patterns('',
(r'^medias/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
)