Modèles de commentaires et de notifications #18
2 changed files with 20 additions and 20 deletions
|
@ -5,11 +5,11 @@ from event.models import Event, Activity
|
|||
|
||||
class AbstractEquipment(models.Model):
|
||||
name = models.CharField(
|
||||
_("Nom du matériel"),
|
||||
_("nom du matériel"),
|
||||
max_length=200,
|
||||
)
|
||||
stock = models.PositiveSmallIntegerField(_("Quantité disponible"))
|
||||
description = models.TextField(_("Description"))
|
||||
stock = models.PositiveSmallIntegerField(_("quantité disponible"))
|
||||
description = models.TextField(_("description"))
|
||||
activities = models.ManyToManyField(
|
||||
Activity,
|
||||
related_name="equipment",
|
||||
|
@ -46,8 +46,8 @@ class TemporaryEquipment(AbstractEquipment):
|
|||
class EquipmentAttribution(models.Model):
|
||||
equipment = models.ForeignKey(AbstractEquipment)
|
||||
activity = models.ForeignKey(Activity)
|
||||
amount = models.PositiveSmallIntegerField(_("Quantité attribuée"))
|
||||
remarks = models.TextField(_("Remarques concernant l'attribution"))
|
||||
amount = models.PositiveSmallIntegerField(_("quantité attribuée"))
|
||||
remarks = models.TextField(_("remarques concernant l'attribution"))
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("attribution de matériel")
|
||||
|
@ -60,7 +60,7 @@ class EquipmentAttribution(models.Model):
|
|||
|
||||
|
||||
class EquipmentRemark(models.Model):
|
||||
remark = models.TextField(_("Remarque sur le matériel"))
|
||||
remark = models.TextField(_("remarque sur le matériel"))
|
||||
equipment = models.ForeignKey(
|
||||
AbstractEquipment,
|
||||
related_name="remarks",
|
||||
|
|
|
@ -7,11 +7,11 @@ from django.db import models
|
|||
|
||||
class Event(models.Model):
|
||||
title = models.CharField(
|
||||
_("Nom de l'évènement"),
|
||||
_("nom de l'évènement"),
|
||||
max_length=200,
|
||||
)
|
||||
slug = models.SlugField(
|
||||
_('Identificateur'),
|
||||
_('identificateur'),
|
||||
unique=True,
|
||||
primary_key=True,
|
||||
help_text=_("Seulement des lettres, des chiffres ou"
|
||||
|
@ -23,12 +23,12 @@ class Event(models.Model):
|
|||
editable=False,
|
||||
)
|
||||
creation_date = models.DateTimeField(
|
||||
_('Date de création'),
|
||||
_('date de création'),
|
||||
auto_now_add=True,
|
||||
)
|
||||
description = models.TextField(_('Description'))
|
||||
beginning_date = models.DateTimeField(_('Date de début'))
|
||||
ending_date = models.DateTimeField(_('Date de fin'))
|
||||
description = models.TextField(_('description'))
|
||||
beginning_date = models.DateTimeField(_('date de début'))
|
||||
ending_date = models.DateTimeField(_('date de fin'))
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("évènement")
|
||||
|
@ -40,7 +40,7 @@ class Event(models.Model):
|
|||
|
||||
class Place(models.Model):
|
||||
name = models.CharField(
|
||||
_("Nom du lieu"),
|
||||
_("nom du lieu"),
|
||||
max_length=200,
|
||||
)
|
||||
description = models.TextField(blank=True)
|
||||
|
@ -55,7 +55,7 @@ class Place(models.Model):
|
|||
|
||||
class ActivityTag(models.Model):
|
||||
name = models.CharField(
|
||||
_("Nom du tag"),
|
||||
_("nom du tag"),
|
||||
max_length=200,
|
||||
)
|
||||
is_public = models.BooleanField(
|
||||
|
@ -70,7 +70,7 @@ class ActivityTag(models.Model):
|
|||
" une couleur en hexadécimal."),
|
||||
)
|
||||
color = models.CharField(
|
||||
_('Couleur'),
|
||||
_('couleur'),
|
||||
max_length=7,
|
||||
validators=[color_regex],
|
||||
help_text=_("Rentrer une couleur en hexadécimal"),
|
||||
|
@ -86,7 +86,7 @@ class ActivityTag(models.Model):
|
|||
|
||||
class ActivityTemplate(models.Model):
|
||||
title = models.CharField(
|
||||
_("Nom de l'activité"),
|
||||
_("nom de l'activité"),
|
||||
max_length=200,
|
||||
blank=True,
|
||||
null=True,
|
||||
|
@ -105,23 +105,23 @@ class ActivityTemplate(models.Model):
|
|||
blank=True,
|
||||
)
|
||||
min_perm = models.PositiveSmallIntegerField(
|
||||
_('Nombre minimum de permanents'),
|
||||
_('nombre minimum de permanents'),
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
max_perm = models.PositiveSmallIntegerField(
|
||||
_('Nombre maximum de permanents'),
|
||||
_('nombre maximum de permanents'),
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
description = models.TextField(
|
||||
_('Description'),
|
||||
_('description'),
|
||||
help_text=_("Public, Visible par tout le monde."),
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
remarks = models.TextField(
|
||||
_('Remarques'),
|
||||
_('remarques'),
|
||||
help_text=_("Visible uniquement par les organisateurs"),
|
||||
blank=True,
|
||||
null=True,
|
||||
|
|
Loading…
Reference in a new issue