Fix the templates so they don't blow up cookiecutter

This commit is contained in:
Daniel Greenfeld 2013-08-16 15:17:18 +02:00
parent d47f30c9fc
commit a6a4f2272d
37 changed files with 125 additions and 140 deletions

View File

@ -1,4 +1,3 @@
{% extends "base.html" %}
{% raw %}{% extends "base.html" %}
{% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %}
{% endraw %}

View File

@ -1,12 +1,16 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load url from future %}
{% load crispy_forms_tags %}
{% block head_title %}{% trans "Account" %}{% endblock %}
{% block content %}
<h1>{% trans "E-mail Addresses" %}</h1>
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>{% trans "E-mail Addresses" %}</h2>
{% if user.emailaddress_set.all %}
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
@ -48,10 +52,10 @@
<h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="" class="add_email uniForm">
<form method="post" action="" class="add_email">
{% csrf_token %}
{{ form.as_p}}
<button name="action_add" type="submit">{% trans "Add E-mail" %}</button>
{{ form|crispy }}
<button class="btn" name="action_add" type="submit">{% trans "Add E-mail" %}</button>
</form>
{% endblock %}
@ -72,3 +76,4 @@
})();
</script>
{% endblock %}
{% endraw %}

View File

@ -1,4 +0,0 @@
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with current_site.name as site_name %}User {{ user_display }} at {{ site_name }} has given this as an email address.
To confirm this is correct, go to {{ activate_url }}
{% endblocktrans %}{% endautoescape %}

View File

@ -1 +0,0 @@
{% include "account/email/email_confirmation_message.txt" %}

View File

@ -1 +0,0 @@
{% include "account/email/email_confirmation_subject.txt" %}

View File

@ -1,4 +0,0 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Confirm E-mail Address{% endblocktrans %}
{% endautoescape %}

View File

@ -1,9 +0,0 @@
{% load i18n %}{% blocktrans with site.domain as site_domain and user.username as username %}You're receiving this e-mail because you or someone else has requested a password for your user account at {{site_domain}}.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.
{{password_reset_url}}
In case you forgot, your username is {{username}}.
Thanks for using our site!
{% endblocktrans %}

View File

@ -1,4 +0,0 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset E-mail{% endblocktrans %}
{% endautoescape %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
@ -10,7 +10,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="col-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
{% if confirmation %}
@ -21,7 +21,7 @@
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button type="submit">{% trans 'Confirm' %}</button>
<button class="submit" type="submit">{% trans 'Confirm' %}</button>
</form>
{% else %}
@ -35,3 +35,4 @@
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
@ -7,11 +7,16 @@
{% block content %}
<h1>{% trans "Confirm E-mail Address" %}</h1>
<div class="container">
<div class="row">
<div class="col-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
{% user_display email_address.user as user_display %}
<p>{% blocktrans with email_address.email as email %}You have confirmed that <a href="mailto:{{email}}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
</div>
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
@ -47,4 +47,4 @@
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
@ -26,3 +26,4 @@
</div>
{% endblock %}
{% endraw %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}You cannot remove your primary e-mail address ({{email}}).{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Confirmation e-mail sent to {{email}}.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Removed e-mail address {{email}}.{% endblocktrans %}

View File

@ -1,4 +0,0 @@
{% load account %}
{% load i18n %}
{% user_display user as name %}
{% blocktrans %}Successfully signed in as {{name}}.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}You have signed out.{% endblocktrans %}

View File

@ -1,3 +0,0 @@
{% load i18n %}
{% blocktrans %}Password successfully changed.{% endblocktrans %}

View File

@ -1,3 +0,0 @@
{% load i18n %}
{% blocktrans %}Password successfully set.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Primary e-mail address set.{% endblocktrans %}

View File

@ -1,2 +0,0 @@
{% load i18n %}
{% blocktrans %}Your primary e-mail address must be verified.{% endblocktrans %}

View File

@ -1,20 +1,22 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load cripsy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h1>{% trans "Change Password" %}</h1>
<h2>{% trans "Change Password" %}</h2>
<form method="POST" action="" class="password_change">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" name="action">{% trans "Change Password" %}</button>
{{ form|crispy }}
<button class="btn" type="submit" name="action">{% trans "Change Password" %}</button>
</form>
</div>
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,14 +1,15 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% trans "Delete Password" %}{% endblock %}
{% block content %}
<h1>{% trans "Delete Password" %}</h1>
<h2>{% trans "Delete Password" %}</h2>
<p>{% blocktrans %}You may delete your password since you are currently logged in using OpenID.{% endblocktrans %}</p>
<form method="post" action="">
{% csrf_token %}
<input type="submit" value="{% trans "delete my password" %}">
<button class="btn" type="submit">{% trans "delete my password" %}</button>
</form>
{% endblock %}
{% endraw %}

View File

@ -1,10 +1,11 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% trans "Password Deleted" %}{% endblock %}
{% block content %}
<h1>{% trans "Password Deleted" %}</h1>
<h2>{% trans "Password Deleted" %}</h2>
<p>{% blocktrans %}Your password has been deleted.{% endblocktrans %}</p>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
@ -11,7 +11,7 @@
<div class="row">
<div class="col-md-5">
<h1>{% trans "Password Reset" %}</h1>
<h2>{% trans "Password Reset" %}</h2>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
@ -35,3 +35,4 @@
$("#id_email").focus();
</script>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
@ -6,11 +6,18 @@
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block content %}
<h1>{% trans "Password Reset" %}</h1>
<div class="container">
<div class="row">
<div class="col-12">
<h2>{% trans "Password Reset" %}</h2>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
</div>
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,24 +1,33 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
{% load cripsy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %}
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
<div class="container">
<div class="row">
<div class="col-12">
<h2>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h2>
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
{% else %}
{% if form %}
<form method="POST" action="" class="uniForm">
<form method="POST" action="">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" name="action" value="{% trans "change password" %}"/>
{{ form|crispy }}
<button type="submit" name="action">{% trans "change password" %}</button>
</form>
{% else %}
<p>{% trans 'Your password is now changed.' %}</p>
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
@ -14,3 +14,4 @@
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,3 +1,4 @@
{% raw %}
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
@ -19,3 +20,4 @@
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
@ -24,3 +24,4 @@
{% endblock content %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
@ -16,5 +16,4 @@
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,5 +0,0 @@
{% load i18n %}
{% load account %}
{% user_display user as user_display %}
<p><strong>{% trans "Note" %}:</strong> {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}</p>

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
@ -16,3 +16,4 @@
</div>
{% endblock %}
{% endraw %}

View File

@ -1,4 +1,4 @@
{% extends "account/base.html" %}
{% raw %}{% extends "account/base.html" %}
{% load url from future %}
{% load i18n %}
@ -26,3 +26,4 @@
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1 +1 @@
{% extend "base.html" %}
{% raw %}{% extend "base.html" %}{% endraw %}

View File

@ -1 +1 @@
{% extend "base.html" %}
{% raw %}{% extend "base.html" %}{% endraw %}