changeset 24:2e7226e90157

Many fixes. See detailed description. - Style errors - Writer proper 404 and 500 templates - Make login page redirect back to page being viewed (still buggy?) - Provide a brief blurb about Agora - Use tables for registration and login forms (need to be styled) - Fix typos, grammatical errors. - Don't use .djhtml extension for some templates
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Mon, 28 Jun 2010 03:00:01 -0500
parents d9658d30b814
children 7e31bce6ea7b
files static/djangodocs.css templates/404.html templates/500.html templates/controls.djhtml templates/index.djhtml templates/registration/activate.html templates/registration/login.html templates/registration/registration_form.html urls.py
diffstat 9 files changed, 52 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/static/djangodocs.css	Sun Jun 27 21:56:57 2010 -0500
+++ b/static/djangodocs.css	Mon Jun 28 03:00:01 2010 -0500
@@ -33,6 +33,13 @@
     overflow: hidden;
 }
 
+.error, .errorlist{
+    color: #ef2929;
+    display: block;
+}
+
+
+
 .whitebox{
     font: 14px/140% "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
     font-weight: lighter;
@@ -112,11 +119,6 @@
 #header div.nav { margin-top: -27px; }
 #footer div.nav { margin-bottom: -18px; }
 
-/*** content ***/
-/*
-#yui-main div.yui-b { position: relative; }
-#yui-main div.yui-b { margin: 0 0 0 20px; background: white; color: black; padding: 0.3em 2em 1em 2em; }
-*/
 
 
 /*** basic styles ***/
@@ -137,7 +139,6 @@
 div.figure p.caption { font-size:1em; margin-top:0; margin-bottom:1.5em; color: #555;}
 hr { color:#ccc; background-color:#ccc; height:1px; border:0; }
 p, ul, dl { margin-top:.6em; margin-bottom:1em; padding-bottom: 0.1em; text-align: left;}
-#yui-main div.yui-b img { max-width: 50em; margin-left: auto; margin-right: auto; display: block; }
 caption { font-size:1em; font-weight:bold; margin-top:0.5em; margin-bottom:0.5em; margin-left: 2px; text-align: center; }
 blockquote { padding: 0 1em; margin: 1em 0; font:125%/1.2em "Trebuchet MS", sans-serif; border-left:2px solid; } 
 strong { font-weight: bold; }
--- a/templates/404.html	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/404.html	Mon Jun 28 03:00:01 2010 -0500
@@ -1,10 +1,12 @@
-<html>
-<head>
-<title>Quoth the server...</title>
-</head>
-<body>
+{% extends "controls.djhtml" %}
+{% block title %}
+Object not found
+{% endblock %}
+{% block content %}
+<div class="whitebox">
 <p>
-404!
+  The resource you were looking for is unavailable. If you think this
+  is our fault, please let us know.
 </p>
-</body>
-</html>
+</div>
+{% endblock %}
--- a/templates/500.html	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/500.html	Mon Jun 28 03:00:01 2010 -0500
@@ -1,14 +1,12 @@
-<html>
-  <head>
-    <title>Oh, snap!</title>
-  </head>
-  <body>
-    <p>
-      Uh... looks like we messed up somehow. If this problem persists,
-      please let us know at agora@octave.org
-    </p>
-    <p>
-      Thanks!
-    </p>
-  </body>
-</html>
+{% extends "controls.djhtml" %}
+{% block title %}
+Server error
+{% endblock %}
+{% block content %}
+<div class="whitebox">
+<p>
+  The server encountered an internal error. If the problem persists,
+  please let us know.
+</p>
+</div>
+{% endblock %}
--- a/templates/controls.djhtml	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/controls.djhtml	Mon Jun 28 03:00:01 2010 -0500
@@ -16,7 +16,7 @@
     </p>
     {% else %}
     <p>
-      <a href="/accounts/login">Log in</a>
+      <a href="{% url auth_login%}?next={{ request.path }}">Log in</a>
     </p>
     {% endif %}
     <form method="get" action="." >
--- a/templates/index.djhtml	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/index.djhtml	Mon Jun 28 03:00:01 2010 -0500
@@ -7,7 +7,10 @@
 </h3>
 <div class="whitebox">
   <p>
-    Main screen turn on!
+    Agora Octave is a place dedicated for rapid collaboration related
+    to <a href="http://octave.org">GNU Octave</a>. You
+    can <a href="/latest">browse our code submissions</a>
+    our <a href="accounts/login">contribute your own</a>.
   </p>
 </div>
 </div>
--- a/templates/registration/activate.html	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/registration/activate.html	Mon Jun 28 03:00:01 2010 -0500
@@ -9,13 +9,13 @@
     {% if account %}
     <p>
       Account successfully activated. 
-      <a href="{% url auth_login%}">Click here</a> to log in.
+      <a href="{% url auth_login %}/">Click here</a> to log in.
     </p>
 
     {% else %}
 
     <p>
-      Account activation failed" %}
+      Account activation failed.
     </p>
 
     {% endif %}
--- a/templates/registration/login.html	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/registration/login.html	Mon Jun 28 03:00:01 2010 -0500
@@ -2,6 +2,7 @@
 
 {% block content %}
 <div id="info">
+
   <h3>
     Login
   </h3>
@@ -17,21 +18,11 @@
 
     {% else %}
 
-    {% if form.errors %}
-    <p>{{form.errors}}</p>
-    {% endif %}
     <form method="post" action=".">
       {% csrf_token %}
-      <p>
-        <label for="id_username">Username:</label>
-        <br/>
-        <input id="id_username" type="text" name="username" maxlength="30" />
-      </p>
-      <p>
-        <label for="id_password">Password:</label> 
-        <br/>
-        <input type="password" name="password" id="id_password" />
-      </p>
+      <table>
+      {{form.as_table}}
+      </table>
       <input type="submit" value="Log in" />
       <input type="hidden" name="next" value="{{ next }}" />
     </form>
@@ -40,7 +31,7 @@
       Forgot password? <a href="{% url auth_password_reset %}">Reset it</a>!
     </p>
     <p>
-      Not member? <a href="{% url registration_register %}">Register</a>!
+      No login name? <a href="{% url registration_register %}">Register</a>!
     </p>
     {% endif %}
 
--- a/templates/registration/registration_form.html	Sun Jun 27 21:56:57 2010 -0500
+++ b/templates/registration/registration_form.html	Mon Jun 28 03:00:01 2010 -0500
@@ -8,35 +8,19 @@
   </h3>
   <div class="whitebox">
     <p>
-      Please provide us some basic information to set up your account.
+      Please give us some basic information to set up your account.
+      Valid usernames consist of letters, numbers, and underscores.
     </p>
+    {% if form.errors %}
+    <p class="error">
+      Please correct the errors below.
+    </p>
+    {% endif %}
     <form action="." method="post">
       {% csrf_token %}
-      <p>
-        <label for="id_username">username: (letters, numbers, underscores)
-        </label>
-        <br />
-        <input id="id_username" type="text" class="required"
-               name="username" maxlength="30" />
-      </p>
-      <p>
-        <label for="id_email">email address:</label>
-        <br />
-        <input id="id_email" type="text" class="required" name="email"
-               maxlength="75" />
-      </p>
-      <p>
-        <label for="id_password1">password:</label>
-        <br />
-        <input id="id_password1" type="password" class="required"
-               name="password1" />
-      </p>
-      <p>
-        <label for="id_password2">password (again):</label>
-        <br />
-        <input id="id_password2" type="password" class="required"
-               name="password2" />
-      </p>      
+      <table>
+      {{form.as_table}}
+      </table>
       <input class="button" type="submit" value="Submit" />
     </form>
   </div>
--- a/urls.py	Sun Jun 27 21:56:57 2010 -0500
+++ b/urls.py	Mon Jun 28 03:00:01 2010 -0500
@@ -16,8 +16,7 @@
      (r'^accounts/logout/', 'django.contrib.auth.views.logout',
       {'template_name' : 'index.djhtml', 'next_page' : '/'}),
 
-     (r'^accounts/', include('registration.urls'),     
-      {'template_name' : 'registration/registration_form.djhtml'} ),
+     (r'^accounts/', include('registration.urls')),
 
      (r'^', include('agora.apps.bundle.urls')),