Self hosted FLOSS fitness/workout, nutrition and weight tracker
Change field type of planed weight to decimal
Roland Geider7fb7c78ec599
diff --git a/wger/manager/migrations/0004_auto_20150609_1603.py b/wger/manager/migrations/0004_auto_20150609_1603.pynew file mode 100644index 000000000..389dce751--- /dev/null+++ b/wger/manager/migrations/0004_auto_20150609_1603.py@@ -0,0 +1,21 @@+# -*- coding: utf-8 -*-+from __future__ import unicode_literals++from django.db import models, migrations+import django.core.validators+++class Migration(migrations.Migration):++ dependencies = [+ ('manager', '0003_auto_20150518_1534'),+ ]++ operations = [+ migrations.AlterField(+ model_name='setting',+ name='weight',+ field=models.DecimalField(decimal_places=2, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1500)], max_digits=6, blank=True, null=True, verbose_name='Weight'),+ preserve_default=True,+ ),+ ]diff --git a/wger/manager/models.py b/wger/manager/models.pyindex 7a983da8b..e4244014f 100644--- a/wger/manager/models.py+++ b/wger/manager/models.py@@ -562,10 +562,12 @@ class Setting(models.Model):verbose_name=_('Exercises'))reps = models.IntegerField(validators=[MinValueValidator(0), MaxValueValidator(100)],verbose_name=_('Repetitions'))- weight = models.IntegerField(verbose_name=_('Weight'),+ weight = models.DecimalField(verbose_name=_('Weight'),+ max_digits=6,+ decimal_places=2,blank=True,null=True,- validators=[MinValueValidator(0), MaxValueValidator(100)])+ validators=[MinValueValidator(0), MaxValueValidator(1500)])'''Planed weight for the repetitions'''order = models.IntegerField(blank=True,