mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Merge branch 'fix_about_crash_on_fresh_install' into 'dev'
Fix of about page crash if no president or CGU file See merge request re2o/re2o!553
This commit is contained in:
commit
d51599c59a
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 Mandate.DoesNotExist:
|
||||||
|
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