1 # -*- coding: utf-8 -*-
3 from django.conf.urls import include, url
4 from django.contrib import admin
5 from django.conf import settings
6 from django.conf.urls.static import static
7 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
8 from django.views.i18n import javascript_catalog
9 import forms_builder.forms.urls
17 url('^accounts/', include('django.contrib.auth.urls')),
20 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
21 url(r'^admin/', admin.site.urls),
23 url(r'^$', redakcja.views.main),
24 url(r'^register$', redakcja.views.register, name='register'),
25 url(r'^documents/', include('catalogue.urls')),
26 url(r'^editor/', include('wiki.urls')),
27 url(r'^organizations/', include('organizations.urls')),
28 url(r'^forms/', include(forms_builder.forms.urls)),
30 url(r'^i18n/', include('django.conf.urls.i18n')),
31 url(r'^jsi18n/$', javascript_catalog, {'packages': ['wiki']}, name='javascript_catalog'),
35 urlpatterns += tuple(staticfiles_urlpatterns())
36 urlpatterns += tuple(static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT))
38 if getattr(settings, 'SERVE_FILES_WITH_DEBUG_FALSE', False):
39 from django.views.static import serve
41 (r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], serve, {'document_root': settings.STATIC_ROOT}),
42 (r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], serve, {'document_root': settings.MEDIA_ROOT}),