Ajout prochain concert sur accueil
This commit is contained in:
parent
af17ed0d46
commit
b208df98ad
4 changed files with 31 additions and 2 deletions
|
|
@ -74,7 +74,12 @@ nav {
|
|||
border-left: 2px solid red;
|
||||
}
|
||||
|
||||
.date_agenda { background-color: #ddd; }
|
||||
.agenda_line { margin-top: 7em !important; margin-right: 7em !important; }
|
||||
@media (max-width: 767.98px) {
|
||||
.agenda_line { margin-top: 1em !important; margin-right: 0 !important; }
|
||||
.agenda_line > div { text-align: center !important; margin-top: 1em !important; }
|
||||
}
|
||||
.date_agenda { background-color: #ddd; text-decoration: none; }
|
||||
.prive {
|
||||
background-image: linear-gradient(45deg, #333333 41.67%, #6b0c0c 41.67%, #6b0c0c 50%, #333333 50%, #333333 91.67%, #6b0c0c 91.67%, #6b0c0c 100%);
|
||||
background-size: 33.94px 33.94px;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,18 @@ from django.views.generic import ListView, TemplateView
|
|||
from .models import Agenda, Document, Membre
|
||||
|
||||
|
||||
class HomeView(TemplateView):
|
||||
template_name="index.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
return {
|
||||
**super().get_context_data(**kwargs),
|
||||
"item": Agenda.objects.filter(
|
||||
date_heure__date__gte=date.today(), prive=False,
|
||||
).order_by("date_heure").first(),
|
||||
}
|
||||
|
||||
|
||||
class AgendaView(ListView):
|
||||
model = Agenda
|
||||
template_name = "agenda.html"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue