Dodanie aplikacji django-cas-provider.
authorzuber <marek@stepniowski.com>
Fri, 2 Oct 2009 17:29:31 +0000 (19:29 +0200)
committerzuber <marek@stepniowski.com>
Fri, 2 Oct 2009 17:29:31 +0000 (19:29 +0200)
project/settings.py
project/templates/cas/login.html [new file with mode: 0644]
project/templates/cas/logout.html [new file with mode: 0644]
project/urls.py

index fc24250..13e0bc5 100644 (file)
@@ -116,6 +116,8 @@ INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.admindocs',
     
     'django.contrib.admin',
     'django.contrib.admindocs',
     
+    'cas_provider',
+    'cas_consumer',
     'explorer',
     'toolbar',
     'api',
     '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
 
 # Python logging settings
 import logging
 
diff --git a/project/templates/cas/login.html b/project/templates/cas/login.html
new file mode 100644 (file)
index 0000000..12ec48f
--- /dev/null
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+
+{% block title %}
+Login
+{% endblock %}
+
+{% block maincontent %}
+  <form action='.' method='post'>
+    <fieldset>
+      <legend>Log in to your account</legend>
+      {% if errors %}
+        <ul>
+            {% for error in errors %}
+                <li>{{ error|escape }}</li>
+            {% endfor %}
+        </ul>
+      {% endif %}
+      <table style="border: none;">
+        {{ form.as_table }}
+      </table>
+      <p><input type="submit" value="Login"/></p>
+    </fieldset>
+  </form>
+{% endblock %}
diff --git a/project/templates/cas/logout.html b/project/templates/cas/logout.html
new file mode 100644 (file)
index 0000000..a555054
--- /dev/null
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}
+Logged out
+{% endblock %}
+
+{% block maincontent %}
+    <h3>Logged out</h3>
+
+    <p>You have successfully logged out. To ensure that you are logged out of all services, please close your browser.</p>
+    {% if url %}<p><a href="{{ url }}">Click here</a> to return to {{ url }}</p>{% endif %}
+{% endblock %}
index c889631..c628d15 100644 (file)
@@ -49,6 +49,9 @@ urlpatterns = patterns('',
 
     # Our über-restful api
     url(r'^api/', include('api.urls') ),
 
     # Our über-restful api
     url(r'^api/', include('api.urls') ),
+    
+    # django-cas-provider
+    url(r'^cas/', include('cas_provider.urls')),
 )
 
 
 )