diff --git a/.env b/.env index 79c6a401..356b41e3 100644 --- a/.env +++ b/.env @@ -11,7 +11,7 @@ TAG=latest ALLOWED_HOSTS=localhost,127.0.0.1 -CSRF_TRUSTED_ORIGINS=http://localhost:8000 +CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000 API_PORT=127.0.0.1:8000 diff --git a/open_prices/locations/migrations/0007_alter_location_osm_brand_and_osm_version.py b/open_prices/locations/migrations/0007_alter_location_osm_brand_and_osm_version.py new file mode 100644 index 00000000..c7fab030 --- /dev/null +++ b/open_prices/locations/migrations/0007_alter_location_osm_brand_and_osm_version.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1 on 2024-12-03 14:42 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("locations", "0006_location_source"), + ] + + operations = [ + migrations.AddField( + model_name="location", + name="osm_brand", + field=models.CharField(blank=True, null=True), + ), + migrations.AddField( + model_name="location", + name="osm_version", + field=models.PositiveIntegerField(blank=True, null=True), + ), + ] diff --git a/open_prices/locations/models.py b/open_prices/locations/models.py index 4b3f0d85..6333e9af 100644 --- a/open_prices/locations/models.py +++ b/open_prices/locations/models.py @@ -36,12 +36,14 @@ class Location(models.Model): "osm_display_name", "osm_tag_key", "osm_tag_value", + "osm_brand", "osm_address_postcode", "osm_address_city", "osm_address_country", "osm_address_country_code", "osm_lat", "osm_lon", + "osm_version", ] TYPE_ONLINE_MANDATORY_FIELDS = ["website_url"] @@ -59,6 +61,7 @@ class Location(models.Model): osm_display_name = models.CharField(blank=True, null=True) osm_tag_key = models.CharField(blank=True, null=True) osm_tag_value = models.CharField(blank=True, null=True) + osm_brand = models.CharField(blank=True, null=True) osm_address_postcode = models.CharField(blank=True, null=True) osm_address_city = models.CharField(blank=True, null=True) osm_address_country = models.CharField(blank=True, null=True) @@ -69,6 +72,7 @@ class Location(models.Model): osm_lon = models.DecimalField( max_digits=11, decimal_places=7, blank=True, null=True ) + osm_version = models.PositiveIntegerField(blank=True, null=True) # type: ONLINE website_url = models.URLField(blank=True, null=True)