From 8d65d35cfaad3ddcb67bf43a373a471d37f079a0 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 27 Apr 2024 23:18:37 +0200 Subject: [PATCH] l'adresse est facultative --- .../migrations/0060_alter_place_address.py | 18 ++++++++++++++++++ src/agenda_culturel/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/agenda_culturel/migrations/0060_alter_place_address.py diff --git a/src/agenda_culturel/migrations/0060_alter_place_address.py b/src/agenda_culturel/migrations/0060_alter_place_address.py new file mode 100644 index 0000000..e3e5e5b --- /dev/null +++ b/src/agenda_culturel/migrations/0060_alter_place_address.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.7 on 2024-04-27 21:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('agenda_culturel', '0059_auto_20240427_1829'), + ] + + operations = [ + migrations.AlterField( + model_name='place', + name='address', + field=models.CharField(blank=True, help_text='Address of this place (without city name)', null=True, verbose_name='Address'), + ), + ] diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 5749177..308a3f4 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -160,7 +160,7 @@ class DuplicatedEvents(models.Model): class Place(models.Model): name = models.CharField(verbose_name=_('Name'), help_text=_('Name of the place')) - address = models.CharField(verbose_name=_('Address'), help_text=_('Address of this place (without city name)')) + address = models.CharField(verbose_name=_('Address'), help_text=_('Address of this place (without city name)'), blank=True, null=True) city = models.CharField(verbose_name=_('City'), help_text=_('City name')) location = PlainLocationField(based_fields=['name', 'address', 'city'], zoom=12)