Optimisations BDD
This commit is contained in:
parent
70ff24c708
commit
b9e128cafb
3 changed files with 17 additions and 16 deletions
|
@ -55,7 +55,7 @@
|
|||
{% endif %}
|
||||
<article class="stage">
|
||||
<section class="misc">
|
||||
<div class="misc-content {% if object.lieux.all %}withmap{% endif %}">
|
||||
<div class="misc-content {% if object.all_lieux %}withmap{% endif %}">
|
||||
<div class="desc">
|
||||
<div class="misc-hdr">
|
||||
<h1>{{ object.sujet }}</h1>
|
||||
|
@ -65,8 +65,8 @@
|
|||
a fait {{ object.type_stage_fem|yesno:"cette,ce" }} <b>{{ object.type_stage_fancy }}</b>
|
||||
{% if object.niveau_scol %}{{ object.niveau_scol_fancy }},{% endif %}
|
||||
{% if object.structure %}au sein de {{ object.structure }}{% endif %}{% if object.encadrants %}, supervisé par {{ object.encadrants }}{% endif %}.</p>
|
||||
{% if object.lieux.all %}<p>Cela s'est passé à :
|
||||
{% for lieu in object.lieux.all %}{{ lieu.nom }} ({{ lieu.ville }}){% if not forloop.last %}, {% endif %}{% endfor %}.</p>
|
||||
{% if object.all_lieux %}<p>Cela s'est passé à :
|
||||
{% for lieu in object.all_lieux %}{{ lieu.nom }} ({{ lieu.ville }}){% if not forloop.last %}, {% endif %}{% endfor %}.</p>
|
||||
{% endif %}
|
||||
|
||||
<ul class="infos">
|
||||
|
@ -79,12 +79,12 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{% if object.lieux.all %}
|
||||
{% if object.all_lieux %}
|
||||
<div class="map">
|
||||
<div id="stage-map"></div>
|
||||
<script type="text/javascript">
|
||||
var lieux = [
|
||||
{% for lieu in object.lieux.all %}
|
||||
{% for lieu in object.all_lieux %}
|
||||
{
|
||||
coord: {lat: "{{ lieu.coord.y|escapejs }}", lon: "{{ lieu.coord.x|escapejs }}" },
|
||||
popup: "<h3>{{ lieu.nom|escapejs }}</h3>" +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue