Skip to content

Commit

Permalink
Location: new osm_brand & osm_version fields
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Dec 3, 2024
1 parent a922030 commit ee0af37
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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),
),
]
4 changes: 4 additions & 0 deletions open_prices/locations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ee0af37

Please sign in to comment.