From 03fd41e359872dfdeaf49c963cbe065c2addfdaa Mon Sep 17 00:00:00 2001 From: Corban-Lee Date: Tue, 5 Nov 2024 13:51:58 +0000 Subject: [PATCH] update venue addres fields --- ...e_county_venueaddress_provence_and_more.py | 28 +++++++++++++++++++ apps/home/models.py | 6 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 apps/home/migrations/0002_rename_county_venueaddress_provence_and_more.py diff --git a/apps/home/migrations/0002_rename_county_venueaddress_provence_and_more.py b/apps/home/migrations/0002_rename_county_venueaddress_provence_and_more.py new file mode 100644 index 0000000..ac2daa8 --- /dev/null +++ b/apps/home/migrations/0002_rename_county_venueaddress_provence_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.6 on 2024-11-05 13:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('apps_home', '0001_initial'), + ] + + operations = [ + migrations.RenameField( + model_name='venueaddress', + old_name='county', + new_name='provence', + ), + migrations.AlterField( + model_name='venueaddress', + name='latitude', + field=models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True), + ), + migrations.AlterField( + model_name='venueaddress', + name='longitude', + field=models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True), + ), + ] diff --git a/apps/home/models.py b/apps/home/models.py index 8ffdc2c..4062e11 100644 --- a/apps/home/models.py +++ b/apps/home/models.py @@ -93,12 +93,12 @@ class VenueAddress(models.Model): street_number = models.IntegerField() street_address = models.CharField(max_length=256) town = models.CharField(max_length=256) - county = models.CharField(max_length=256) + provence = models.CharField(max_length=256) post_code = models.CharField(max_length=32) satnav_post_code = models.CharField(max_length=32) country = models.CharField(max_length=128) - latitude = models.DecimalField(max_digits=22, decimal_places=16) - longitude = models.DecimalField(max_digits=22, decimal_places=16) + latitude = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True) + longitude = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True) class Meta: verbose_name = "venue address"