'pagination',
'sorl.thumbnail',
'piwik.django',
+ 'django_cas',
'django.contrib.auth',
'django.contrib.contenttypes',
--- /dev/null
+if 'django_cas' in INSTALLED_APPS:
+ AUTHENTICATION_BACKENDS = (
+ 'django.contrib.auth.backends.ModelBackend',
+ 'django_cas.backends.CASBackend',
+ )
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
+)
+
+if 'django_cas' in INSTALLED_APPS:
+ MIDDLEWARE_CLASSES += (
+ 'django_cas.middleware.CASMiddleware',
+ )
+
+MIDDLEWARE_CLASSES += (
'django.contrib.messages.middleware.MessageMiddleware',
'piwik.django.middleware.PiwikMiddleware',
# Uncomment the next line for simple clickjacking protection:
'pagination.middleware.PaginationMiddleware',
'realip_middleware.SetRemoteAddrFromXRealIP',
)
+
+
THUMBNAIL_QUALITY = 95
GRAVATAR_DEFAULT_IMAGE = 'http://localhost:8000/static/img/avatar.png'
+
+CAS_SERVER_URL = 'http://logowanie.nowoczesnapolska.org.pl/cas/'
+CAS_VERSION = '1'
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
-) + i18n_patterns('',
+ )
+
+if 'django_cas' in settings.INSTALLED_APPS:
+ urlpatterns += patterns('',
+ (r'^accounts/login/$', 'django_cas.views.login'),
+ (r'^accounts/logout/$', 'django_cas.views.logout'),
+ )
+
+urlpatterns += i18n_patterns('',
url(string_concat(r'^', _('events'), r'/'), include('events.urls')),
url(r'^comments/', include('django_comments_xtd.urls')),
) + migdal_urlpatterns
Django>=1.4,<1.5
+#django_cas
+-e hg+https://bitbucket.org/cpcc/django-cas@197f156ee943#egg=django_cas
South>=0.7.4
PIL
sorl-thumbnail>=11.09,<12