mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Finish the move to Jinja2
This commit is contained in:
parent
239133e355
commit
afc87888a6
@ -1,4 +0,0 @@
|
|||||||
{% load renderer %}
|
|
||||||
|
|
||||||
{{ text|markdown }}
|
|
||||||
|
|
@ -43,5 +43,10 @@
|
|||||||
Site réalisé par des gens biens
|
Site réalisé par des gens biens
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</footer>
|
</footer>
|
||||||
|
<!--
|
||||||
|
{% block tests %}
|
||||||
|
{{ tests }}
|
||||||
|
{% endblock %}
|
||||||
|
-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
{% 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>
|
<p><a href="{{ url('core:group_list') }}">Back to list</a></p>
|
||||||
<h2>Edit group</h2>
|
<h2>Edit group</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{{ csrf_input }}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="Update" /></p>
|
<p><input type="submit" value="Update" /></p>
|
||||||
</form>
|
</form>
|
@ -8,7 +8,7 @@ Group list
|
|||||||
<h3>Group list</h3>
|
<h3>Group list</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for g in group_list %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,14 +0,0 @@
|
|||||||
{% extends "core/base.jinja" %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
{% if form.errors %}
|
|
||||||
<p>Your passwords didn't match. Please try again.</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<form method="post" action="{% url 'core:password_change' %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
{{ form.as_p }}
|
|
||||||
<input type="submit" value="Change!" />
|
|
||||||
</form>
|
|
||||||
{% endblock %}
|
|
10
core/templates/core/password_change.jinja
Normal file
10
core/templates/core/password_change.jinja
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<form method="post" action="{{ url('core:password_change') }}">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form.as_p() }}
|
||||||
|
<input type="submit" value="Change!" />
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
@ -1,13 +0,0 @@
|
|||||||
{% 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 %}
|
|
||||||
|
|
6
core/templates/core/password_change_done.jinja
Normal file
6
core/templates/core/password_change_done.jinja
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<p>You successfully changed your password!</p>
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p() }}
|
||||||
<input type="submit" value="Reset!" />
|
<input type="submit" value="Reset!" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>You successfully reset your password!</p>
|
<p>You successfully reset your password!</p>
|
||||||
<a href="{% url 'core:login' %}">Login</a>
|
<a href="{{ url('core:login') }}">Login</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p() }}
|
||||||
<input type="submit" value="Reset" />
|
<input type="submit" value="Reset" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,15 +0,0 @@
|
|||||||
{% 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 %}
|
|
||||||
|
|
15
core/templates/core/password_reset_email.jinja
Normal file
15
core/templates/core/password_reset_email.jinja
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{% 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>
|
<h1>{{ title }}</h1>
|
||||||
|
|
||||||
{% if user_registered %}
|
{% 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.
|
You successfully registred and you will soon receive a confirmation mail.
|
||||||
|
|
||||||
Your username is {{ user_registered.username }}.
|
Your username is {{ user_registered.username }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form action="{% url 'core:register' %}" method="post">
|
<form action="{{ url('core:register') }}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
<p><input type="submit" value="Register!" /></p>
|
<p><input type="submit" value="Register!" /></p>
|
@ -7,6 +7,7 @@
|
|||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="Update" /></p>
|
<p><input type="submit" value="Update" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
<p><a href="{{ url('core:password_change') }}">Change my password</a></p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ class GroupListView(CanEditMixin, ListView):
|
|||||||
Displays the group list
|
Displays the group list
|
||||||
"""
|
"""
|
||||||
model = Group
|
model = Group
|
||||||
template_name = "core/group_list.html"
|
template_name = "core/group_list.jinja"
|
||||||
|
|
||||||
class GroupEditView(CanEditMixin, UpdateView):
|
class GroupEditView(CanEditMixin, UpdateView):
|
||||||
model = Group
|
model = Group
|
||||||
pk_url_kwarg = "group_id"
|
pk_url_kwarg = "group_id"
|
||||||
template_name = "core/group_edit.html"
|
template_name = "core/group_edit.jinja"
|
||||||
form_class = GroupEditForm
|
form_class = GroupEditForm
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user