From: zuber Date: Fri, 2 Oct 2009 17:29:31 +0000 (+0200) Subject: Dodanie aplikacji django-cas-provider. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/090fa209bd92925fbd407b8c3e7c996f5762fd3f?ds=inline Dodanie aplikacji django-cas-provider. --- diff --git a/project/settings.py b/project/settings.py index fc242509..13e0bc59 100644 --- a/project/settings.py +++ b/project/settings.py @@ -116,6 +116,8 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.admindocs', + 'cas_provider', + 'cas_consumer', 'explorer', 'toolbar', 'api', @@ -133,6 +135,10 @@ EDITOR_DEFAULT_SETTINGS = { ], } +# django-cas-provider +LOGIN_URL = '/cas/login/' +LOGOUT_URL = '/cas/logout/' + # Python logging settings import logging diff --git a/project/templates/cas/login.html b/project/templates/cas/login.html new file mode 100644 index 00000000..12ec48f3 --- /dev/null +++ b/project/templates/cas/login.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block title %} +Login +{% endblock %} + +{% block maincontent %} +
+
+ Log in to your account + {% if errors %} +
    + {% for error in errors %} +
  • {{ error|escape }}
  • + {% endfor %} +
+ {% endif %} + + {{ form.as_table }} +
+

+
+
+{% endblock %} diff --git a/project/templates/cas/logout.html b/project/templates/cas/logout.html new file mode 100644 index 00000000..a555054b --- /dev/null +++ b/project/templates/cas/logout.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %} +Logged out +{% endblock %} + +{% block maincontent %} +

Logged out

+ +

You have successfully logged out. To ensure that you are logged out of all services, please close your browser.

+ {% if url %}

Click here to return to {{ url }}

{% endif %} +{% endblock %} diff --git a/project/urls.py b/project/urls.py index c8896314..c628d150 100644 --- a/project/urls.py +++ b/project/urls.py @@ -49,6 +49,9 @@ urlpatterns = patterns('', # Our über-restful api url(r'^api/', include('api.urls') ), + + # django-cas-provider + url(r'^cas/', include('cas_provider.urls')), )