diff --git a/core/forms.py b/core/forms.py index 6e9e0341..549076b3 100644 --- a/core/forms.py +++ b/core/forms.py @@ -119,7 +119,7 @@ class ChildDeleteForm(forms.ModelForm): class DiaperChangeForm(CoreModelForm): class Meta: model = models.DiaperChange - fields = ['child', 'time', 'wet', 'solid', 'color', 'amount'] + fields = ['child', 'time', 'wet', 'solid', 'color', 'amount', 'notes'] widgets = { 'time': forms.DateTimeInput(attrs={ 'readonly': 'readonly', @@ -131,7 +131,7 @@ class DiaperChangeForm(CoreModelForm): class FeedingForm(CoreModelForm): class Meta: model = models.Feeding - fields = ['child', 'start', 'end', 'type', 'method', 'amount'] + fields = ['child', 'start', 'end', 'type', 'method', 'amount', 'notes'] widgets = { 'start': forms.DateTimeInput(attrs={ 'readonly': 'readonly', @@ -153,7 +153,7 @@ class NoteForm(CoreModelForm): class SleepForm(CoreModelForm): class Meta: model = models.Sleep - fields = ['child', 'start', 'end'] + fields = ['child', 'start', 'end', 'notes'] widgets = { 'start': forms.DateTimeInput(attrs={ 'readonly': 'readonly', @@ -169,7 +169,7 @@ class SleepForm(CoreModelForm): class TemperatureForm(CoreModelForm): class Meta: model = models.Temperature - fields = ['child', 'temperature', 'time'] + fields = ['child', 'temperature', 'time', 'notes'] widgets = { 'time': forms.DateTimeInput(attrs={ 'readonly': 'readonly', @@ -219,7 +219,7 @@ class TummyTimeForm(CoreModelForm): class WeightForm(CoreModelForm): class Meta: model = models.Weight - fields = ['child', 'weight', 'date'] + fields = ['child', 'weight', 'date', 'notes'] widgets = { 'date': forms.DateInput(attrs={ 'readonly': 'readonly', diff --git a/core/migrations/0011_auto_20200214_1939.py b/core/migrations/0011_auto_20200214_1939.py new file mode 100644 index 00000000..459d058e --- /dev/null +++ b/core/migrations/0011_auto_20200214_1939.py @@ -0,0 +1,38 @@ +# Generated by Django 3.0.3 on 2020-02-15 03:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0010_timer_child'), + ] + + operations = [ + migrations.AddField( + model_name='diaperchange', + name='notes', + field=models.TextField(blank=True, null=True, verbose_name='Notes'), + ), + migrations.AddField( + model_name='feeding', + name='notes', + field=models.TextField(blank=True, null=True, verbose_name='Notes'), + ), + migrations.AddField( + model_name='sleep', + name='notes', + field=models.TextField(blank=True, null=True, verbose_name='Notes'), + ), + migrations.AddField( + model_name='temperature', + name='notes', + field=models.TextField(blank=True, null=True, verbose_name='Notes'), + ), + migrations.AddField( + model_name='weight', + name='notes', + field=models.TextField(blank=True, null=True, verbose_name='Notes'), + ), + ] diff --git a/core/models.py b/core/models.py index 2f05caf1..36758d26 100644 --- a/core/models.py +++ b/core/models.py @@ -153,6 +153,7 @@ class DiaperChange(models.Model): verbose_name=_('Color') ) amount = models.FloatField(blank=True, null=True, verbose_name=_('Amount')) + notes = models.TextField(blank=True, null=True, verbose_name=_('Notes')) objects = models.Manager() @@ -227,6 +228,7 @@ class Feeding(models.Model): verbose_name=_('Method') ) amount = models.FloatField(blank=True, null=True, verbose_name=_('Amount')) + notes = models.TextField(blank=True, null=True, verbose_name=_('Notes')) objects = models.Manager() @@ -310,6 +312,7 @@ class Sleep(models.Model): null=True, verbose_name=_('Duration') ) + notes = models.TextField(blank=True, null=True, verbose_name=_('Notes')) objects = models.Manager() naps = NapsManager() @@ -362,6 +365,7 @@ class Temperature(models.Model): null=False, verbose_name=_('Time') ) + notes = models.TextField(blank=True, null=True, verbose_name=_('Notes')) objects = models.Manager() @@ -552,6 +556,7 @@ class Weight(models.Model): null=False, verbose_name=_('Date') ) + notes = models.TextField(blank=True, null=True, verbose_name=_('Notes')) objects = models.Manager()