Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
afc87888
Commit
afc87888
authored
Feb 02, 2016
by
Skia
Browse files
Finish the move to Jinja2
parent
239133e3
Changes
17
Hide whitespace changes
Inline
Side-by-side
core/templates/core/404.
html
→
core/templates/core/404.
jinja
View file @
afc87888
File moved
core/templates/core/api/markdown.html
deleted
100644 → 0
View file @
239133e3
{% load renderer %}
{{ text|markdown }}
core/templates/core/base.jinja
View file @
afc87888
...
...
@@ -43,5 +43,10 @@
Site réalisé par des gens biens
{%
endblock
%}
</footer>
<!--
{%
block
tests
%}
{{
tests
}}
{%
endblock
%}
-->
</body>
</html>
core/templates/core/edit_user.html
deleted
100644 → 0
View file @
239133e3
{% 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 %}
core/templates/core/group_edit.
html
→
core/templates/core/group_edit.
jinja
View file @
afc87888
...
...
@@ -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>
...
...
core/templates/core/group_list.
html
→
core/templates/core/group_list.
jinja
View file @
afc87888
...
...
@@ -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
%}
...
...
core/templates/core/password_change.
html
→
core/templates/core/password_change.
jinja
View file @
afc87888
...
...
@@ -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
%}
core/templates/core/password_change_done.
html
→
core/templates/core/password_change_done.
jinja
View file @
afc87888
{%
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 %}
<p>
You successfully changed your password!
</p>
{%
endblock
%}
core/templates/core/password_reset.
html
→
core/templates/core/password_reset.
jinja
View file @
afc87888
...
...
@@ -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
%}
core/templates/core/password_reset_complete.
html
→
core/templates/core/password_reset_complete.
jinja
View file @
afc87888
...
...
@@ -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
%}
core/templates/core/password_reset_confirm.
html
→
core/templates/core/password_reset_confirm.
jinja
View file @
afc87888
...
...
@@ -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
%}
...
...
core/templates/core/password_reset_done.
html
→
core/templates/core/password_reset_done.
jinja
View file @
afc87888
File moved
core/templates/core/password_reset_email.html
deleted
100644 → 0
View file @
239133e3
{% 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 %}
core/templates/core/password_reset_email.jinja
0 → 100644
View file @
afc87888
{%
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
%}
core/templates/core/register.
html
→
core/templates/core/register.
jinja
View file @
afc87888
...
...
@@ -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>
...
...
core/templates/core/user_edit.jinja
View file @
afc87888
...
...
@@ -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
%}
...
...
core/views/group.py
View file @
afc87888
...
...
@@ -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
Skia
🤘
@skia
mentioned in issue
#11 (closed)
·
Feb 02, 2016
mentioned in issue
#11 (closed)
mentioned in issue #11
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment