diff --git a/AKModel/migrations/0026_akslot_updated.py b/AKModel/migrations/0026_akslot_updated.py new file mode 100644 index 0000000000000000000000000000000000000000..a22023befe7454ae5d94eae5429c14bb730911a7 --- /dev/null +++ b/AKModel/migrations/0026_akslot_updated.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.6 on 2019-10-31 00:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ('AKModel', '0025_contact_email'), + ] + + operations = [ + migrations.AddField( + model_name='akslot', + name='updated', + field=models.DateTimeField(auto_now=True, verbose_name='Last update'), + ), + ] diff --git a/AKModel/models.py b/AKModel/models.py index 57c35f41bc3e72d8d9d8f2fe6b61a609e77d9cf0..45319e302bf3d2ef0553372ab20d996d86fe6598 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -24,7 +24,8 @@ class Event(models.Model): help_text='Default length in hours that is assumed for AKs in this event.') contact_email = models.EmailField(verbose_name=_("Contact email address"), blank=True, - help_text=_("An email address that is displayed on every page and can be used for all kinds of questions")) + help_text=_( + "An email address that is displayed on every page and can be used for all kinds of questions")) class Meta: verbose_name = _('Event') @@ -263,6 +264,8 @@ class AKSlot(models.Model): event = models.ForeignKey(to=Event, on_delete=models.CASCADE, verbose_name=_('Event'), help_text=_('Associated event')) + updated = models.DateTimeField(auto_now=True, verbose_name=_("Last update")) + class Meta: verbose_name = _('AK Slot') verbose_name_plural = _('AK Slots')