Add behind the scene section on index
This commit is contained in:
parent
7faff5368f
commit
1dfad41e3d
2 changed files with 27 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
<p>
|
||||
{% blocktranslate trimmed %}
|
||||
This website aims to collect the pictures and movies taken in the student
|
||||
life of ENS Paris-Saclay-Saclay or involving its students.
|
||||
life of ENS Paris-Saclay or involving its students.
|
||||
{% endblocktranslate %}
|
||||
</p>
|
||||
<p>
|
||||
|
|
@ -48,4 +48,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<h3 class="mt-4">{% trans "Behind the scene" %}</h3>
|
||||
<p>
|
||||
{% blocktranslate trimmed %}
|
||||
Because we value your privacy, we do not sell the data on this site,
|
||||
unlike many free online platforms.
|
||||
The dedicated server running this website is kindly hosted by the
|
||||
<a href="https://www.crans.org/">Crans</a> at the ENS Paris-Saclay
|
||||
basement.
|
||||
It is not managed by the Crans. Current active administrators are:
|
||||
{% endblocktranslate %}
|
||||
{% for user in superusers %} <code>{{ user.username }}</code>{% endfor %}.
|
||||
{% trans "They should be contacted at" %}
|
||||
<a href="mailto:photos@crans.org">photos@crans.org</a>.
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
# Copyright (C) 2021-2022 Amicale des élèves de l'ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import HttpResponse
|
||||
from django.views.generic import ListView, View
|
||||
|
|
@ -21,3 +22,13 @@ class IndexView(LoginRequiredMixin, ListView):
|
|||
queryset = Gallery.objects.all()
|
||||
paginate_by = 4
|
||||
template_name = "index.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
# Get superusers
|
||||
User = get_user_model()
|
||||
superusers = User.objects.filter(is_superuser=True)
|
||||
context["superusers"] = superusers
|
||||
|
||||
return context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue