Simplify flag system
This commit is contained in:
parent
e2d5e726cd
commit
910d8fe9c0
2 changed files with 2 additions and 6 deletions
|
@ -16,7 +16,6 @@ class Equipment(EventSpecificMixin, models.Model):
|
|||
related_name="equipment",
|
||||
through="EquipmentAttribution",
|
||||
)
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("matériel")
|
||||
|
@ -31,7 +30,6 @@ class EquipmentAttribution(models.Model):
|
|||
activity = models.ForeignKey(Activity)
|
||||
amount = models.PositiveSmallIntegerField(_("quantité attribuée"))
|
||||
remarks = models.TextField(_("remarques concernant l'attribution"))
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("attribution de matériel")
|
||||
|
|
|
@ -50,6 +50,7 @@ class EventSpecificMixin(models.Model):
|
|||
blank=True,
|
||||
null=True
|
||||
)
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
@ -61,7 +62,6 @@ class Place(EventSpecificMixin, models.Model):
|
|||
max_length=200,
|
||||
)
|
||||
description = models.TextField(blank=True)
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("lieu")
|
||||
|
@ -93,7 +93,6 @@ class ActivityTag(EventSpecificMixin, models.Model):
|
|||
validators=[color_regex],
|
||||
help_text=_("Rentrer une couleur en hexadécimal"),
|
||||
)
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("tag")
|
||||
|
@ -148,13 +147,13 @@ class AbstractActivityTemplate(SubscriptionMixin, models.Model):
|
|||
Place,
|
||||
blank=True,
|
||||
)
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class ActivityTemplate(AbstractActivityTemplate):
|
||||
needs_event_permissions = True
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("template activité")
|
||||
|
@ -177,7 +176,6 @@ class Activity(AbstractActivityTemplate):
|
|||
|
||||
beginning = models.DateTimeField(_("heure de début"))
|
||||
end = models.DateTimeField(_("heure de fin"))
|
||||
needs_event_permissions = True
|
||||
|
||||
def get_herited(self, attrname):
|
||||
inherited_fields = [f.name for f in ActivityTemplate._meta.get_fields()]
|
||||
|
|
Loading…
Reference in a new issue