From 5a31b868715dbd1a4e7fd87f0f9f04e2c8395391 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 13 Jan 2015 18:17:27 -0600 Subject: Slight tweaks to login and logout pages Turns out has_errors hasn't worked since Django pre-1.0, wow. Remove that old code and clean up some other small things while we're in there. Signed-off-by: Dan McGee --- sitestatic/archweb.css | 4 ++++ templates/registration/login.html | 10 ++-------- templates/registration/logout.html | 5 +++-- urls.py | 14 +++++--------- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index cd46e4c0..cc3b9742 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -401,6 +401,10 @@ ul.errorlist { color: red; } +form ul.errorlist { + margin: 0.5em 0; +} + /* JS sorting via tablesorter */ table th.tablesorter-header { padding-right: 20px; diff --git a/templates/registration/login.html b/templates/registration/login.html index 82f74f58..b5894319 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -5,21 +5,15 @@ {% block content %}
-

Developer Login

- {% if form.has_errors %} - - {% endif %} -
{% csrf_token %}
- Enter login credentials + Please enter your credentials to login. {{ form.as_p }} -

+

-
{% endblock %} diff --git a/templates/registration/logout.html b/templates/registration/logout.html index 50b3574b..84bbff94 100644 --- a/templates/registration/logout.html +++ b/templates/registration/logout.html @@ -1,11 +1,12 @@ {% extends "base.html" %} + {% block title %}Arch Linux - Logout successful{% endblock %} {% block content %}

Developer Logout

-

Logout was successful.

+

Logout was successful. + Click here to login again.

{% endblock %} - diff --git a/urls.py b/urls.py index 36e3fef1..76271ece 100644 --- a/urls.py +++ b/urls.py @@ -92,12 +92,10 @@ urlpatterns += patterns('', 'news-sitemap'), ) -# Authentication / Admin +# Authentication urlpatterns += patterns('django.contrib.auth.views', - (r'^login/$', 'login', { - 'template_name': 'registration/login.html'}), - (r'^logout/$', 'logout', { - 'template_name': 'registration/logout.html'}), + (r'^login/$', 'login', {'template_name': 'registration/login.html'}, 'login'), + (r'^logout/$', 'logout', {'template_name': 'registration/logout.html'}, 'logout'), ) # Redirects for older known pages we see in the logs @@ -119,10 +117,8 @@ legacy_urls = ( ('^docs/en/guide/install/arch-install-guide.html', 'https://wiki.archlinux.org/index.php/Installation_guide'), - ('^docs/en/', - 'https://wiki.archlinux.org/'), - ('^docs/', - 'https://wiki.archlinux.org/'), + ('^docs/en/', 'https://wiki.archlinux.org/'), + ('^docs/', 'https://wiki.archlinux.org/'), ) urlpatterns += [url(old_url, RedirectView.as_view(url=new_url)) -- cgit v1.2.3-55-g3dc8