mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Fix of about page crash if no president or CGU file
This commit is contained in:
parent
0df3542ec1
commit
546656e9f9
2 changed files with 8 additions and 1 deletions
|
@ -43,8 +43,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<h4>{% trans "Publication manager" %}</h4>
|
<h4>{% trans "Publication manager" %}</h4>
|
||||||
<p>{{ president }} - {% trans "President of " %} {{ option.pseudo }}</p>
|
<p>{{ president }} - {% trans "President of " %} {{ option.pseudo }}</p>
|
||||||
|
|
||||||
|
{% if gtu %}
|
||||||
<h4>{% trans "General Terms of Use" %}</h4>
|
<h4>{% trans "General Terms of Use" %}</h4>
|
||||||
<p><a href='{{ gtu.url }}' download='CGU'>{{ gtu }}</a></p>
|
<p><a href='{{ gtu.url }}' download='CGU'>{{ gtu }}</a></p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if option.description %}
|
{% if option.description %}
|
||||||
<h4>{% trans "Additional information" %}</h4>
|
<h4>{% trans "Additional information" %}</h4>
|
||||||
|
|
|
@ -115,13 +115,18 @@ def about_page(request):
|
||||||
|
|
||||||
dependencies = settings.INSTALLED_APPS + settings.MIDDLEWARE_CLASSES
|
dependencies = settings.INSTALLED_APPS + settings.MIDDLEWARE_CLASSES
|
||||||
|
|
||||||
|
try:
|
||||||
|
president = Mandate.get_mandate().president.get_full_name()
|
||||||
|
except:
|
||||||
|
president = _("Unable to get the information.")
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
"re2o/about.html",
|
"re2o/about.html",
|
||||||
{
|
{
|
||||||
"option": option,
|
"option": option,
|
||||||
"gtu": general.GTU,
|
"gtu": general.GTU,
|
||||||
"president": Mandate.get_mandate().president.get_full_name(),
|
"president": president,
|
||||||
"git_info_contributors": git_info_contributors,
|
"git_info_contributors": git_info_contributors,
|
||||||
"git_info_remote": git_info_remote,
|
"git_info_remote": git_info_remote,
|
||||||
"git_info_branch": git_info_branch,
|
"git_info_branch": git_info_branch,
|
||||||
|
|
Loading…
Reference in a new issue