Commit afc87888 authored by Skia's avatar Skia

Finish the move to Jinja2

parent 239133e3
{% load renderer %}
{{ text|markdown }}
......@@ -43,5 +43,10 @@
Site réalisé par des gens biens
{% endblock %}
</footer>
<!--
{% block tests %}
{{ tests }}
{% endblock %}
-->
</body>
</html>
{% extends "core/base.jinja" %}
{% block title %}
{% if profile %}
Edit {{ profile.get_display_name }}
{% endif %}
{% endblock %}
{% block content %}
{% if profile %}
<h3>Edit user</h3>
<p><a href="{% url 'core:user_profile' profile.id %}">Back to profile</a></p>
<p>You're editing the profile of <strong>{{ profile.get_display_name }}</strong></p>
<form action="{% url 'core:user_edit' profile.id %}" method="post">
{% csrf_token %}
{{ user_form }}
<p><input type="submit" value="Save!" /></p>
</form>
{% endif %}
{% endblock %}
......@@ -4,7 +4,7 @@
<p><a href="{{ url('core:group_list') }}">Back to list</a></p>
<h2>Edit group</h2>
<form action="" method="post">
{{ csrf_input }}
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Update" /></p>
</form>
......
......@@ -8,7 +8,7 @@ Group list
<h3>Group list</h3>
<ul>
{% for g in group_list %}
<li><a href="{{ url('core:group_edit', kwargs={'group_id': g.id} }}">{{ g.name }}</a></li>
<li><a href="{{ url('core:group_edit', group_id=g.id) }}">{{ g.name }}</a></li>
{% endfor %}
</ul>
{% endblock %}
......
......@@ -2,13 +2,9 @@
{% block content %}
{% if form.errors %}
<p>Your passwords didn't match. Please try again.</p>
{% endif %}
<form method="post" action="{% url 'core:password_change' %}">
<form method="post" action="{{ url('core:password_change') }}">
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p() }}
<input type="submit" value="Change!" />
</form>
{% endblock %}
{% extends "core/base.jinja" %}
{% block content %}
{% if form.errors %}
<p>Your passwords didn't match. Please try again.</p>
{% else %}
You successfully changed your password!
{% endif %}
{% endblock %}
{% extends "core/base.jinja" %}
{% block content %}
<p>You successfully changed your password!</p>
{% endblock %}
......@@ -3,7 +3,7 @@
{% block content %}
<form method="post" action="">
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p() }}
<input type="submit" value="Reset!" />
</form>
{% endblock %}
......@@ -2,7 +2,7 @@
{% block content %}
<p>You successfully reset your password!</p>
<a href="{% url 'core:login' %}">Login</a>
<a href="{{ url('core:login') }}">Login</a>
{% endblock %}
......@@ -3,7 +3,7 @@
{% block content %}
<form method="post" action="">
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p() }}
<input type="submit" value="Reset" />
</form>
{% endblock %}
......
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'core:password_reset_confirm' uidb64=uid token=token %}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }}
{% trans "Thanks for using our site!" %}
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
{% endautoescape %}
{% autoescape off %}
{% trans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endtrans %}
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
{% endblock %}
{% trans %}Your username, in case you've forgotten: {% endtrans %} {{ user.get_username() }}
{% trans %}Thanks for using our site! {% endtrans %}
{% trans %}The {{ site_name }} team{% endtrans %}
{% endautoescape %}
......@@ -6,13 +6,13 @@
<h1>{{ title }}</h1>
{% if user_registered %}
Welcome {{ user_registered.get_display_name }}!
Welcome {{ user_registered.get_display_name() }}!
You successfully registred and you will soon receive a confirmation mail.
Your username is {{ user_registered.username }}.
{% endif %}
<form action="{% url 'core:register' %}" method="post">
<form action="{{ url('core:register') }}" method="post">
{% csrf_token %}
{{ form }}
<p><input type="submit" value="Register!" /></p>
......
......@@ -7,6 +7,7 @@
{{ form.as_p() }}
<p><input type="submit" value="Update" /></p>
</form>
<p><a href="{{ url('core:password_change') }}">Change my password</a></p>
{% endblock %}
......
......@@ -10,11 +10,11 @@ class GroupListView(CanEditMixin, ListView):
Displays the group list
"""
model = Group
template_name = "core/group_list.html"
template_name = "core/group_list.jinja"
class GroupEditView(CanEditMixin, UpdateView):
model = Group
pk_url_kwarg = "group_id"
template_name = "core/group_edit.html"
template_name = "core/group_edit.jinja"
form_class = GroupEditForm
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment