1 # -*- coding: utf-8 -*-
3 from django.conf.urls import include, patterns, 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.generic import RedirectView
9 import forms_builder.forms.urls
14 urlpatterns = patterns('',
16 #url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
17 #url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
18 #url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
19 #url(r'^accounts/logout/$', 'django.contrib.auth.views.login', name='logout'),
20 #url(r'^admin/login/$', 'django_cas.views.login', name='login'),
21 #url(r'^admin/logout/$', 'django_cas.views.logout', name='logout'),
22 url('^accounts/', include('django.contrib.auth.urls')),
25 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
26 (r'^admin/', include(admin.site.urls)),
28 url(r'^$', 'redakcja.views.main'),
29 url(r'^register$', 'redakcja.views.register', name='register'),
30 url(r'^documents/', include('catalogue.urls')),
31 url(r'^editor/', include('wiki.urls')),
32 url(r'^cover/', include('cover.urls')),
33 url(r'^organizations/', include('organizations.urls')),
34 url(r'^forms/', include(forms_builder.forms.urls)),
36 url(r'^i18n/', include('django.conf.urls.i18n')),
37 (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', dict(packages=['wiki'])),
42 urlpatterns += staticfiles_urlpatterns()
43 urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
45 if getattr(settings, 'SERVE_FILES_WITH_DEBUG_FALSE', False):
46 urlpatterns += patterns('',
47 (r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
48 (r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),