From e8c9196fc0d6aaad92cbf0c4694edbc110140ce0 Mon Sep 17 00:00:00 2001 From: Chris Giacofei Date: Wed, 26 Jun 2024 14:56:09 -0400 Subject: [PATCH] Field help text. Specify units used. --- ...equipmentprofile_table_comment_and_more.py | 103 ++++++++++++++++++ ..._equipmentprofile_batch_volume_and_more.py | 68 ++++++++++++ beer/models.py | 30 +++-- 3 files changed, 190 insertions(+), 11 deletions(-) create mode 100644 beer/migrations/0016_alter_equipmentprofile_table_comment_and_more.py create mode 100644 beer/migrations/0017_alter_equipmentprofile_batch_volume_and_more.py diff --git a/beer/migrations/0016_alter_equipmentprofile_table_comment_and_more.py b/beer/migrations/0016_alter_equipmentprofile_table_comment_and_more.py new file mode 100644 index 0000000..aecd841 --- /dev/null +++ b/beer/migrations/0016_alter_equipmentprofile_table_comment_and_more.py @@ -0,0 +1,103 @@ +# Generated by Django 5.0.6 on 2024-06-26 17:49 + +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('beer', '0015_batch_fermenter_topup_vol_batch_fermenter_vol_and_more'), + ] + + operations = [ + migrations.AlterModelTableComment( + name='equipmentprofile', + table_comment='Volumes in liters and weights in kg.', + ), + migrations.AlterField( + model_name='batch', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='leaf_hop_trub', + field=models.DecimalField(db_comment='liters/gram', decimal_places=10, default=0.0083454045, max_digits=12), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='pellet_hop_trub', + field=models.DecimalField(db_comment='liters/gram', decimal_places=10, default=0.003338162, max_digits=12), + ), + migrations.AlterField( + model_name='fermentable', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='hop', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='mash', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='mashstep', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='misc', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='recipe', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='recipefermentable', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='recipehop', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='recipemisc', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='recipeyeast', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='supplier', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='unit', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + migrations.AlterField( + model_name='userprofile', + name='created_date', + field=models.DateTimeField(default=django.utils.timezone.now, editable=False), + ), + ] diff --git a/beer/migrations/0017_alter_equipmentprofile_batch_volume_and_more.py b/beer/migrations/0017_alter_equipmentprofile_batch_volume_and_more.py new file mode 100644 index 0000000..49a46b6 --- /dev/null +++ b/beer/migrations/0017_alter_equipmentprofile_batch_volume_and_more.py @@ -0,0 +1,68 @@ +# Generated by Django 5.0.6 on 2024-06-26 18:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('beer', '0016_alter_equipmentprofile_table_comment_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='equipmentprofile', + name='batch_volume', + field=models.DecimalField(decimal_places=2, default=5.5, help_text='liters', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='grain_absorption', + field=models.DecimalField(decimal_places=2, default=0.12, help_text='liters/kilogram', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='hlt_deadspace', + field=models.DecimalField(decimal_places=2, default=0.25, help_text='liters', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='kettle_boil_rate', + field=models.DecimalField(decimal_places=2, default=0.5, help_text='liters/hr', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='kettle_deadspace', + field=models.DecimalField(decimal_places=2, default=0.25, help_text='liters', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='kettle_plumbing_loss', + field=models.DecimalField(decimal_places=2, default=0.25, help_text='liters', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='leaf_hop_trub', + field=models.DecimalField(decimal_places=10, default=0.0083454045, help_text='liters/gram', max_digits=12), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='mash_ratio', + field=models.DecimalField(decimal_places=2, default=2.6, help_text='liters/kilogram', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='mt_capacity', + field=models.DecimalField(decimal_places=2, default=10, help_text='liters', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='mt_deadspace', + field=models.DecimalField(decimal_places=2, default=0.25, help_text='liters', max_digits=6), + ), + migrations.AlterField( + model_name='equipmentprofile', + name='pellet_hop_trub', + field=models.DecimalField(decimal_places=10, default=0.003338162, help_text='liters/gram', max_digits=12), + ), + ] diff --git a/beer/models.py b/beer/models.py index 04660a3..d690235 100644 --- a/beer/models.py +++ b/beer/models.py @@ -581,31 +581,39 @@ class EquipmentProfile(CustomModel): # Water managment stuff hlt_deadspace = models.DecimalField( - max_digits=6, decimal_places=2, default=0.25) + max_digits=6, decimal_places=2, default=0.25, help_text='liters') mt_deadspace = models.DecimalField( - max_digits=6, decimal_places=2, default=0.25) + max_digits=6, decimal_places=2, default=0.25, help_text='liters') mt_capacity = models.DecimalField( - max_digits=6, decimal_places=2, default=10) + max_digits=6, decimal_places=2, default=10, help_text='liters') grain_absorption = models.DecimalField( - max_digits=6, decimal_places=2, default=0.12) # gal/lb + max_digits=6, decimal_places=2, + default=0.12, help_text='liters/kilogram') kettle_deadspace = models.DecimalField( - max_digits=6, decimal_places=2, default=0.25) + max_digits=6, decimal_places=2, default=0.25, help_text='liters') kettle_plumbing_loss = models.DecimalField( - max_digits=6, decimal_places=2, default=0.25) + max_digits=6, decimal_places=2, default=0.25, help_text='liters') kettle_boil_rate = models.DecimalField( - max_digits=6, decimal_places=2, default=0.5) # gal/hr + max_digits=6, decimal_places=2, + default=0.5, help_text='liters/hr') batch_volume = models.DecimalField( - max_digits=6, decimal_places=2, default=5.5) + max_digits=6, decimal_places=2, default=5.5, help_text='liters') leaf_hop_trub = models.DecimalField( - max_digits=6, decimal_places=4, default=0.0625) + max_digits=12, decimal_places=10, + default=0.0083454045, help_text='liters/gram') pellet_hop_trub = models.DecimalField( - max_digits=6, decimal_places=4, default=0.025) + max_digits=12, decimal_places=10, + default=0.0033381620, help_text='liters/gram') hops_remain_kettle = models.BooleanField(default=True) mash_ratio = models.DecimalField( - max_digits=6, decimal_places=2, default=2.6) # 1.25 qt/lb + max_digits=6, decimal_places=2, + default=2.6, help_text='liters/kilogram') # Thermal Properties mt_initial_hear = models.DecimalField( max_digits=6, decimal_places=4, default=0.74) mt_heat_loss_hour = models.DecimalField( max_digits=6, decimal_places=4, default=2.0) + + class Meta: + db_table_comment = 'Volumes in liters and weights in kg.'