Mise en place d'un embryon de template commun

This commit is contained in:
Jean-Marie Favreau 2023-10-18 21:59:52 +02:00
parent 0af45f6d23
commit d6836d3661
8 changed files with 188 additions and 13 deletions

View File

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 61 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -1,2 +1,10 @@
{% extends "agenda_culturel/page.html" %}
{% block title %}{{ object.title }}{% endblock %}
{% block content %}
<h1>{{ object.title }}</h1>
<p>Date&nbsp;: {{ object.start_day }}</p>
<p>Date&nbsp;: {{ object.start_day }}</p>
{% endblock %}

View File

@ -1,3 +1,8 @@
{% extends "agenda_culturel/page.html" %}
{% block title %}Accueil{% endblock %}
{% block content %}
<h1>Événements</h1>
<ul>
{% for event in object_list %}
@ -5,4 +10,5 @@
{% empty %}
<li>Il n'y a pas d'événement.</li>
{% endfor %}
</ul>
</ul>
{% endblock %}

View File

@ -1 +1,14 @@
ça marche
{% extends "agenda_culturel/page.html" %}
{% block title %}Accueil{% endblock %}
{% block content %}
<h1>Événements</h1>
<ul>
{% for event in object_list %}
<li><a href="{{ BASE_URL }}{{ event.get_absolute_url }}">{{ event.start_day|date }} : {{ event.title }}</a></li>
{% empty %}
<li>Il n'y a pas d'événement.</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{% endblock %}</title>
{% load static %}
{% if debug %}
<link rel="icon" type="image/svg+xml" href="{% static 'images/favicon-dev.svg' %}">
{% else %}
<link rel="icon" type="image/svg+xml" href="{% static 'images/favicon.svg' %}">
{% endif %}
<link rel="stylesheet" href="{% static 'css/style.css' %}">
{% block entete_header %}
{% endblock %}
</head>
<body>
<div id="full_content" class="{% block classe_principale %}{% endblock %}">
{% block content %}{% endblock %}
</div>
</body>

View File

@ -1,15 +1,12 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Proposer un événement</title>
</head>
<body>
<h2>Formulaire de proposition d'événement</h2>
{% extends "agenda_culturel/page.html" %}
{% block title %}Proposer un événement{% endblock %}
{% block content %}
<h1>Formulaire de proposition d'événement</h1>
<form method="post" action="">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Proposer un événement">
</form>
</body>
</html>
{% endblock %}