mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 07:41:14 +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
|
||||
{% endblock %}
|
||||
</footer>
|
||||
<!--
|
||||
{% block tests %}
|
||||
{{ tests }}
|
||||
{% endblock %}
|
||||
-->
|
||||
</body>
|
||||
</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>
|
||||
<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 %}
|
@ -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 %}
|
||||
<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 %}
|
@ -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>
|
||||
|
||||
{% 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user