review the login view
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 10 Dec 2012 14:33:26 +0000 (15:33 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 10 Dec 2012 14:33:26 +0000 (15:33 +0100)
README
templates/login-view.html

diff --git a/README b/README
index 18f7ac9..3e2416e 100644 (file)
--- a/README
+++ b/README
@@ -14,7 +14,10 @@ See devel/ for more devel-oriented doc.
   much like our past drupal_set_html_head() 
 
 * auth: 
-  a django 'app' that deals with authentication
+  a django 'app' that deals with authentication; see especially
+  auth.backend.MyCustomBackend 
+  for how to use a separate authentication system, 
+  as well as settings.py for how to enable it
 
 * slice:
   a django app for dealing with slice views
index 5376577..1a39cd3 100644 (file)
@@ -1,29 +1,17 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<title>Log in</title>
-<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-<style>
-body{
-       font-family:Arial,Helvetica,sans-serif;
-       font-size: 12px;
-}
-</style>
-</head>
-<body>
-       {{ state }}
-          <a href="/" alt="Home"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>
-       <form action="/login/" method="post">
-               {% csrf_token %}
-               {% if next %}
-               <input type="hidden" name="next" value="{{ next }}" />
-               {% endif %}
-               username:
-               <input type="text" name="username" value="{{ username}}" /><br />
-               password:
-               <input type="password" name="password" value="" /><br />
+{% extends 'myslice-layout.html' %}
 
-               <input type="submit" value="Log In" />
-       </form>
-</body>
-</html>
+{% block content_related %}
+<p class='login-status'> {{ state }} </p>
+<a href="/" alt="Home"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>
+<form action="/login/" method="post">
+  {% csrf_token %}
+  {% if next %}
+  <input type="hidden" name="next" value="{{ next }}" />
+  {% endif %}
+  username:
+  <input type="text" name="username" value="{{ username}}" /><br />
+  password:
+  <input type="password" name="password" value="" /><br />
+  <input type="submit" value="Log In" />
+</form>
+{% endblock content_related %}