diff --git a/countdown/migrations/0006_auto_20201025_1716.py b/countdown/migrations/0006_auto_20201025_1716.py new file mode 100644 index 0000000..72a2fc3 --- /dev/null +++ b/countdown/migrations/0006_auto_20201025_1716.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.2 on 2020-10-25 17:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('countdown', '0005_countdownitem_recurring_until'), + ] + + operations = [ + migrations.AlterField( + model_name='countdownitem', + name='recurring_period', + field=models.CharField(blank=True, default='', max_length=64), + ), + migrations.AlterField( + model_name='countdownitem', + name='reminder_target', + field=models.CharField(blank=True, default='', max_length=64), + ), + ] diff --git a/countdown/models.py b/countdown/models.py index fc2c89c..6a84fc3 100644 --- a/countdown/models.py +++ b/countdown/models.py @@ -1,14 +1,8 @@ """Countdown item models.""" - -import logging - from django.db import models from django.utils import timezone -log = logging.getLogger('countdown.models') - - class CountdownItem(models.Model): """Track points in time.""" @@ -19,13 +13,13 @@ class CountdownItem(models.Model): sent_reminder = models.BooleanField(default=False) reminder_message = models.TextField(default="") - reminder_target = models.CharField(max_length=64, default='') + reminder_target = models.CharField(max_length=64, blank=True, default='') - recurring_period = models.CharField(max_length=64, default='') + recurring_period = models.CharField(max_length=64, blank=True, default='') recurring_until = models.DateTimeField(null=True, blank=True, default=None) created_time = models.DateTimeField(auto_now_add=True) def __str__(self): - """String representation.""" + """Summarize object.""" return "{0:s} @ {1:s}".format(self.name, timezone.localtime(self.at_time).strftime('%Y-%m-%d %H:%M:%S %Z'))