ernestophone.ens.fr/actu/models.py

18 lines
490 B
Python
Raw Permalink Normal View History

from django.db import models
from django.utils.translation import gettext_lazy as _
2021-04-29 00:27:33 +02:00
class Actu(models.Model):
2021-04-29 00:27:33 +02:00
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"))
2021-04-29 00:27:33 +02:00
def __str__(self):
return self.text
class Meta:
verbose_name = _("Actualité")
verbose_name_plural = _("Actualités")
2021-04-29 00:27:33 +02:00
ordering = ("order",)