19 lines
553 B
Python
19 lines
553 B
Python
from django.db import models
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
class EventSpecificMixin(models.Model):
|
|
"""Mixin allowing for event-specific models instances
|
|
or not (depending on whether the event field is null)"""
|
|
|
|
event = models.ForeignKey(
|
|
'event.Event',
|
|
verbose_name=_("évènement"),
|
|
help_text=_("Si spécifié, l'instance du modèle"
|
|
"est spécifique à l'évènement en question"),
|
|
blank=True,
|
|
null=True
|
|
)
|
|
|
|
class Meta:
|
|
abstract = True
|