Changement de champ rainbow du modèle : Bool > Choice
This commit is contained in:
parent
45fdd4683b
commit
079e0d1c3f
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ class Actu(models.Model):
|
|||
text = models.TextField(_("Info"), null=True, blank=False)
|
||||
text_en = models.TextField(("Info en anglais"), null=True, blank=True)
|
||||
order = models.IntegerField(verbose_name=_("ordre"))
|
||||
rainbow = models.BooleanField(_("Actu en arc-en-ciel"), default=False)
|
||||
rainbow = models.CharField(verbose_name = _("Actu en arc-en-ciel"), max_length=1, choices = (('y', 'Oui'), ('n', 'Non')), default='n', blank = False)
|
||||
|
||||
def __str__(self):
|
||||
return self.text
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<h4> <span class="ernestocouleur">{% blocktrans count counter=actu|length %}Actualité des chef·fe·s:{% plural %}Actualités des chef·fe·s:{% endblocktrans %}</span></h4>
|
||||
<ul>
|
||||
{% for a in actu %}
|
||||
<li>{% if a.rainbow %}<span class="ernestocouleur font-weight-bold">{% endif %}{% autotranslate current_language a.text a.text_en %}{% if a.rainbow %}</span>{% endif %}</li>
|
||||
<li>{% if a.rainbow == 'y' %}<span class="ernestocouleur font-weight-bold">{% endif %}{% autotranslate current_language a.text a.text_en %}{% if a.rainbow %}</span>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue