summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2015-01-13 18:17:27 -0600
committerDan McGee <dan@archlinux.org>2015-01-13 18:24:56 -0600
commit5a31b868715dbd1a4e7fd87f0f9f04e2c8395391 (patch)
treec10f736a66080cc07f5514db2686c792d717ad47
parent1edc33fd73ba588dea8765cd2d9a936f98d7dc1e (diff)
downloadarchweb-5a31b868715dbd1a4e7fd87f0f9f04e2c8395391.tar.gz
archweb-5a31b868715dbd1a4e7fd87f0f9f04e2c8395391.zip
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 <dan@archlinux.org>
-rw-r--r--sitestatic/archweb.css4
-rw-r--r--templates/registration/login.html10
-rw-r--r--templates/registration/logout.html5
-rw-r--r--urls.py14
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 %}
<div id="dev-login" class="box">
-
<h2>Developer Login</h2>
- {% if form.has_errors %}
- <p class="login-error">Your username and password didn't match. Please try again.</p>
- {% endif %}
-
<form id="dev-login-form" method="post">{% csrf_token %}
<fieldset>
- <legend>Enter login credentials</legend>
+ <legend>Please enter your credentials to login.</legend>
{{ form.as_p }}
- <p><label></label> <input type="submit" value="Login" /></p>
+ <p><label></label><input type="submit" value="Login"/></p>
</fieldset>
</form>
-
</div>
{% 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 %}
<div id="dev-logout" class="box">
<h2>Developer Logout</h2>
- <p>Logout was successful.<p>
+ <p>Logout was successful.
+ <a href='{% url 'login' %}'>Click here to login again.</a></p>
</div>
{% 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))