From d6039f57675a2db589c785e5b2fb65b9d2fbdc01 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 4 Mar 2018 10:27:06 +0100 Subject: [PATCH] Fix gps required --- gym/migrations/0005_auto_20180304_1025.py | 23 +++++++++++++++++++++++ gym/models.py | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 gym/migrations/0005_auto_20180304_1025.py diff --git a/gym/migrations/0005_auto_20180304_1025.py b/gym/migrations/0005_auto_20180304_1025.py new file mode 100644 index 0000000..0ccc569 --- /dev/null +++ b/gym/migrations/0005_auto_20180304_1025.py @@ -0,0 +1,23 @@ +# Generated by Django 2.0.2 on 2018-03-04 09:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gym', '0004_auto_20180303_1801'), + ] + + operations = [ + migrations.AlterField( + model_name='room', + name='latitude', + field=models.DecimalField(blank=True, decimal_places=8, max_digits=11, null=True, verbose_name='latitude'), + ), + migrations.AlterField( + model_name='room', + name='longitude', + field=models.DecimalField(blank=True, decimal_places=8, max_digits=11, null=True, verbose_name='longitude'), + ), + ] diff --git a/gym/models.py b/gym/models.py index a38d59c..2b81a6f 100644 --- a/gym/models.py +++ b/gym/models.py @@ -7,8 +7,8 @@ class Room(models.Model): verbose_name_plural = 'salles' name = models.CharField('nom', max_length=300) - latitude = models.DecimalField('latitude', max_digits=11, decimal_places=8, blank=True) - longitude = models.DecimalField('longitude', max_digits=11, decimal_places=8, blank=True) + latitude = models.DecimalField('latitude', max_digits=11, decimal_places=8, blank=True, null=True) + longitude = models.DecimalField('longitude', max_digits=11, decimal_places=8, blank=True, null=True) notes = models.TextField('notes', blank=True) def __str__(self):