some fixes & migrations
This commit is contained in:
parent
400b5ac402
commit
bf0a0b42a9
40
apps/establishment/migrations/0093_auto_20200131_1359.py
Normal file
40
apps/establishment/migrations/0093_auto_20200131_1359.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Generated by Django 2.2.7 on 2020-01-31 13:59
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('establishment', '0092_merge_20200131_0835'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='EstablishmentBackOfficeWine',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('bottles', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)])),
|
||||
('price_from', models.DecimalField(decimal_places=2, max_digits=14, verbose_name='price from')),
|
||||
('price_to', models.DecimalField(decimal_places=2, max_digits=14, verbose_name='price to')),
|
||||
('price_from_for_one', models.DecimalField(decimal_places=2, default=None, max_digits=14, null=True, verbose_name='price for one item from')),
|
||||
('price_to_for_one', models.DecimalField(decimal_places=2, default=None, max_digits=14, null=True, verbose_name='price for one item to')),
|
||||
('is_glass', models.BooleanField(default=False, verbose_name='served in glass')),
|
||||
('establishment', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='back_office_wine', to='establishment.Establishment', verbose_name='establishment')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'establishment back office wine',
|
||||
'verbose_name_plural': 'establishment back office wines',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='menu',
|
||||
name='type',
|
||||
field=models.CharField(choices=[('formulas', 'formulas'), ('starter', 'starter'), ('dessert', 'dessert'), ('main_course', 'main_course')], db_index=True, default='formulas', max_length=50, verbose_name='Menu type'),
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='MenuUploads',
|
||||
),
|
||||
]
|
||||
22
apps/establishment/migrations/0094_auto_20200203_1307.py
Normal file
22
apps/establishment/migrations/0094_auto_20200203_1307.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 2.2.7 on 2020-02-03 13:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('establishment', '0093_auto_20200131_1359'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='plate',
|
||||
name='description',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='plate',
|
||||
name='name',
|
||||
field=models.TextField(blank=True, default=None, help_text='Dish name', null=True, verbose_name='name'),
|
||||
),
|
||||
]
|
||||
18
apps/location/migrations/0040_auto_20200203_1454.py
Normal file
18
apps/location/migrations/0040_auto_20200203_1454.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.7 on 2020-02-03 14:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('location', '0039_auto_20200131_1610'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='address',
|
||||
name='district_name',
|
||||
field=models.CharField(blank=True, default=None, max_length=500, null=True, verbose_name='District name'),
|
||||
),
|
||||
]
|
||||
|
|
@ -247,7 +247,7 @@ class Address(models.Model):
|
|||
coordinates = models.PointField(
|
||||
_('Coordinates'), blank=True, null=True, default=None)
|
||||
district_name = models.CharField(
|
||||
_('District name'), max_length=500, blank=True, default='', null=True)
|
||||
_('District name'), max_length=500, blank=True, default=None, null=True)
|
||||
old_id = models.IntegerField(null=True, blank=True, default=None)
|
||||
|
||||
class Meta:
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class AddressBaseSerializer(serializers.ModelSerializer):
|
|||
read_only=True)
|
||||
geo_lat = serializers.FloatField(source='latitude', allow_null=True,
|
||||
read_only=True)
|
||||
district_name = serializers.CharField(allow_blank=True, required=False)
|
||||
district_name = serializers.CharField(allow_blank=True, required=False, allow_null=True)
|
||||
|
||||
class Meta:
|
||||
"""Meta class."""
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user