Merge pull request #174 from elnappo/master

template improvements
This commit is contained in:
ThomasWaldmann 2014-10-28 19:36:09 +01:00
commit 7878acf681
16 changed files with 63 additions and 74 deletions

View File

@ -13,14 +13,14 @@ env:
- TEST_OPTS=""
- COVERAGE=""
matrix:
- DJANGO=1.7.0
- DJANGO=1.7.1
matrix:
exclude:
- python: "2.7"
env: DJANGO=1.7.0
env: DJANGO=1.7.1
include:
- python: "2.7"
env: DJANGO=1.7.0 COVERAGE="coverage run -m" TEST_K="" TEST_OPTS="--pep8"
env: DJANGO=1.7.1 COVERAGE="coverage run -m" TEST_K="" TEST_OPTS="--pep8"
install:
- "pip install --use-mirrors Django==$DJANGO"
- "pip install --use-mirrors -r requirements.d/travis.txt"

View File

@ -2,13 +2,14 @@
{% load i18n %}{% load bootstrap %}
{% url 'auth_login' as auth_login_url %}
{% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
{% block content %}
{% if account %}
{% blocktrans %}
Thanks {{ account }}, activation complete!
You may now <a href='{{ auth_login_url }}'>login</a> using the username and password you set at registration.
{% endblocktrans %}
<h2>{% trans 'Thanks, activation complete!' %}</h2>
<p>{% trans 'You may now login using the username and password you set at registration.' %}</p>
<p><a href="{{ login_url }}"><button class="btn btn-primary" type="button">{% trans "Log in" %}</button></a></p>
{% else %}
{% blocktrans %}Oops -- it seems that your activation key is invalid. Please check the url again.{% endblocktrans %}
<h2>{% trans 'Oops' %}</h2>
<p>{% trans 'it seems that your activation key is invalid. Please check the url again.' %}</p>
{% endif %}
{% endblock %}

View File

@ -1,9 +1,9 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}{% load bootstrap %}
{% block title %}Activation complete{% endblock %}
{% block title %}{% trans 'Activation complete' %}{% endblock %}
{% block content %}
<h1>Thanks, activation complete!</h1>
<p>You may now <a href="{% url 'django.contrib.auth.views.login' %}">login</a> using the username and password you set at registration.</p>
<h2>{% trans 'Thanks, activation complete!' %}</h2>
<p>{% trans 'You may now login using the username and password you set at registration.' %}</p>
<p><a href="{{ login_url }}"><button class="btn btn-primary" type="button">{% trans "Log in" %}</button></a></p>
{% endblock %}

View File

@ -1,8 +1,8 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}{% load bootstrap %}
{% block title %}{% trans "Activation email sent" %}{% endblock %}
{% block content %}
{% blocktrans %}An activation email has been sent.
Please check your email and click on the link to activate your account.{% endblocktrans %}
{% endblock %}
{% block title %}{% trans 'Activation email sent' %}{% endblock %}
{% block content %}
<h2>{% trans 'An activation email has been sent.' %}</h2>
<p>{% trans 'Please check your email and click on the link to activate your account.' %}</p>
{% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}{% load bootstrap %}
{% load bootstrap %}
{% block title %}{% trans "Register for an account" %}{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-6">
<div class="col-md-5">
<h2>{% trans "No registration required for testing" %}</h2>
<p>
{% trans "You can easily test the service and see what you get." %}
@ -34,7 +34,7 @@
finishing your initial evaluation.{% endblocktrans %}
</p>
</div>
<div class="col-md-6">
<div class="col-md-7">
<h2>{% trans "Register new account" %}</h2>
<p>
{% blocktrans %}
@ -43,15 +43,17 @@
E-Mail address: must be a <em>working</em> one, we'll send you an activation E-Mail there.<br>
Password: please use a sane one, we trust you.{% endblocktrans %}
</p>
<form class="form-horizontal" role="form" method="post" action="">
<br>
<form class="form-horizontal jumbotron" role="form" method="post" action="">
{% csrf_token %}
{{ form|bootstrap_horizontal }}
{{ form|bootstrap_horizontal:"col-sm-3 col-lg-3" }}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="col-sm-offset-3 col-sm-9">
<input type="submit" class="btn btn-primary" value="{% trans "Send activation email" %}" />
</div>
</div>
</form>
</div>
</div>
<script type="text/javascript">document.getElementById("id_username").focus();</script>
{% endblock %}

View File

@ -12,18 +12,17 @@
{% endif %}
<form class="form-horizontal" role="form" method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
{{ form|bootstrap_horizontal }}
{{ form|bootstrap_horizontal:"col-sm-3 col-lg-3" }}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="col-sm-offset-3 col-sm-9">
<input id="id_remember_me" name="remember_me" type="checkbox">
<label class="control-label " for="id_remember_me">{% trans "Remember me" %}</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-primary" value="{% trans 'Log in' %}" />
<div class="col-sm-offset-3 col-sm-9">
<input type="submit" class="btn btn-primary" value="{% trans 'Log in' %}" /> <a href="{% url 'django.contrib.auth.views.password_reset' %}">{% trans 'Forgot your password?' %}</a>
<p></p>
<p><a href="{% url 'django.contrib.auth.views.password_reset' %}">{% trans 'Forgot your password?' %}</a></p>
<p><a href="{% url 'registration_register' %}">{% trans "Sign up for a new account..." %}</a></p>
</div>
</div>

View File

@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load i18n %}{% load bootstrap %}
{% block title %}{% trans "Log out" %}{% endblock %}
{% block content %}
<div class="container">
<div class="form-signin">

View File

@ -1,10 +1,8 @@
{% extends "base.html" %}
{% load i18n %}{% load bootstrap %}
{% block title %}{% trans 'Password change successful' %}{% endblock %}
{% block content %}
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>{% trans 'Password change successful' %}</h4>
{% trans 'Your password was changed.' %}
</div>{% endblock %}
{% block content %}
<h2>{% trans 'Password change successful' %}</h2>
<p>{% trans 'Your password was changed.' %}</p>
{% endblock %}

View File

@ -4,23 +4,21 @@
{% block content %}
<div class="row">
<h2>{% trans "Password reset" %}</h2>
<hr />
<p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
<br>
<div class="col-md-6">
<form class="form-horizontal" role="form" method="post">
{% csrf_token %}
{{ form|bootstrap_horizontal }}
{{ form|bootstrap_horizontal:"col-sm-3 col-lg-3" }}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="col-sm-offset-3 col-sm-9">
<input type="submit" class="btn btn-primary" value="{% trans 'Reset my password' %}" />
</div>
</div>
</form>
</div>
</div>
<script type="text/javascript">document.getElementById("id_email").focus();</script>
{% endblock %}

View File

@ -4,8 +4,6 @@
{% block content %}
<h2>{% trans 'Password reset complete' %}</h2>
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
<p><a href="{{ login_url }}"><button class="btn btn-primary" type="button">{% trans "Log in" %}</button></a></p>
{% endblock %}

View File

@ -4,28 +4,21 @@
{% block content %}
{% if validlink %}
<h2>{% trans 'Enter new password' %}</h2>
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
<form class="form-horizontal" role="form" method="post">
{% csrf_token %}
{{ form|bootstrap_horizontal }}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-primary" value="{% trans 'Change my password' %}" />
<h2>{% trans 'Enter new password' %}</h2>
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
<form class="form-horizontal" role="form" method="post">
{% csrf_token %}
{{ form|bootstrap_horizontal }}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-primary" value="{% trans 'Change my password' %}" />
</div>
</div>
</div>
</form>
<script type="text/javascript">document.getElementById("id_new_password1").focus();</script>
</form>
<script type="text/javascript">document.getElementById("id_new_password1").focus();</script>
{% else %}
<h2>{% trans 'Password reset unsuccessful' %}</h2>
<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
<h2>{% trans 'Password reset unsuccessful' %}</h2>
<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
{% endblock %}

View File

@ -4,8 +4,6 @@
{% block content %}
<h2>{% trans 'Password reset successful' %}</h2>
<p>{% trans "We've emailed you instructions for setting your password. You should be receiving them shortly." %}</p>
<p>{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p>
{% endblock %}

View File

@ -4,7 +4,7 @@
{% block content %}
<div class="row">
<h1>{% blocktrans %}About the {{ WWW_HOST }} service{% endblocktrans %}</h1>
<div class="col-lg-4">
<div class="col-md-4">
<h2>{% trans "What's this?" %}</h2>
<p>
{% blocktrans %}{{ WWW_HOST }} is a <b>dynamic dns service</b>.{% endblocktrans %}
@ -18,7 +18,7 @@
{% blocktrans %}{{ WWW_HOST }} is <b>simple, usable, free, friendly, secure and respects your privacy</b>.{% endblocktrans %}
</p>
</div>
<div class="col-lg-4">
<div class="col-md-4">
<h2>{% trans "Why another one?" %}</h2>
<p>
{% blocktrans %}As far as we know, there was no service yet that is <em>not</em>:{% endblocktrans %}
@ -31,7 +31,7 @@
between a ton of commercial-only features{% endblocktrans %}</li>
</ul>
</div>
<div class="col-lg-4">
<div class="col-md-4">
<h2>{% trans "How is it?" %}</h2>
<p>
{% trans "You can just try it using the test account (see Register page)." %}
@ -49,7 +49,7 @@
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="col-md-4">
<h2>{% trans "Fair use of the service" %}</h2>
<p>
{% trans "The only thing we expect from you is fair use of this service:" %}
@ -67,7 +67,7 @@
related to unfair use of the service - at any time and without prior notice.{% endblocktrans %}
</p>
</div>
<div class="col-lg-4">
<div class="col-md-4">
<h2>{% trans "No warranties" %}</h2>
<p>
{% trans "This is free software and a free service, there are no warranties." %}
@ -76,7 +76,7 @@
{% trans "If it breaks, it breaks." %}
</p>
</div>
<div class="col-lg-4">
<div class="col-md-4">
<h2>{% trans "Service Contact" %}</h2>
<p>
{{ SERVICE_CONTACT }}

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load i18n %}{% load bootstrap %}
{% load i18n %}{% load bootstrap %}{% load humanize %}
{% block content %}
<div class="row">
@ -53,7 +53,7 @@
<td>{{ host.get_ipv4 }}
<br>
{% if host.last_update_ipv4 %}
({{ host.last_update_ipv4|timesince }},
({{ host.last_update_ipv4|naturaltime }},
{% if not host.tls_update_ipv4 %}
<span class="label label-warning">no {% else %}
<span class="label label-success">{% endif %}TLS</span>)
@ -64,7 +64,7 @@
<td>{{ host.get_ipv6 }}
<br>
{% if host.last_update_ipv6 %}
({{ host.last_update_ipv6|timesince }},
({{ host.last_update_ipv6|naturaltime }},
{% if not host.tls_update_ipv6 %}
<span class="label label-warning">no {% else %}
<span class="label label-success">{% endif %}TLS</span>)

View File

@ -150,6 +150,7 @@ INSTALLED_APPS = (
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'social.apps.django_app.default',
'nsupdate.login',
'nsupdate',

View File

@ -1,7 +1,7 @@
# packages always needed
dnspython
netaddr
django==1.7.0
django==1.7.1
django-bootstrap-form
django-registration-redux
django-extensions