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