Revision 700b2afb
Added by Serghei Mihai about 11 years ago
| corbo/settings.py | ||
|---|---|---|
|
RSS_DESCRIPTION = ''
|
||
|
RSS_LINK = ''
|
||
|
RSS_LINK_TEMPLATE = '/#announce{0}'
|
||
|
|
||
|
# django-mellon settings
|
||
|
MELLON_ATTRIBUTE_MAPPING = {
|
||
|
'username': '{attributes[username][0]}',
|
||
|
'email': '{attributes[email][0]}',
|
||
|
'first_name': '{attributes[first_name][0]}',
|
||
|
'last_name': '{attributes[last_name][0]}',
|
||
|
}
|
||
|
|
||
|
if 'mellon' in INSTALLED_APPS:
|
||
|
AUTHENTICATION_BACKENDS = ('mellon.backends.SAMLBackend', )
|
||
|
LOGIN_URL = 'mellon_login'
|
||
|
LOGOUT_URL = 'mellon_logout'
|
||
| corbo/urls.py | ||
|---|---|---|
|
url(r'^manage/', decorated_includes(manager_required,
|
||
|
include(manage_urls))),
|
||
|
url(r'^ckeditor/', include('ckeditor.urls')),
|
||
|
url('^accounts/', include('django.contrib.auth.urls')),
|
||
|
url(r'^admin/', include(admin.site.urls))
|
||
|
)
|
||
|
|
||
|
if 'mellon' in settings.INSTALLED_APPS:
|
||
|
# authentication with django-mellon
|
||
|
urlpatterns += patterns('',
|
||
|
url(r'^accounts/mellon/', include('mellon.urls')),
|
||
|
)
|
||
|
else:
|
||
|
urlpatterns += patterns('',
|
||
|
url('^accounts/', include('django.contrib.auth.urls')),
|
||
|
)
|
||
|
|
||
|
|
||
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||
|
urlpatterns += staticfiles_urlpatterns()
|
||
Also available in: Unified diff
handling authentication through django-mellon