Merge branch 'develop' into feature/custom_filters

# Conflicts:
#	cookbook/serializer.py
#	cookbook/views/api.py
#	vue/src/utils/openapi/api.ts
This commit is contained in:
vabene1111
2022-02-07 18:56:19 +01:00
45 changed files with 1538 additions and 320 deletions

View File

@@ -0,0 +1,34 @@
# Generated by Django 3.2.11 on 2022-02-03 15:03
import cookbook.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('cookbook', '0168_add_unit_searchfields'),
]
operations = [
migrations.CreateModel(
name='ExportLog',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('type', models.CharField(max_length=32)),
('running', models.BooleanField(default=True)),
('msg', models.TextField(default='')),
('total_recipes', models.IntegerField(default=0)),
('exported_recipes', models.IntegerField(default=0)),
('cache_duration', models.IntegerField(default=0)),
('possibly_not_expired', models.BooleanField(default=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.space')),
],
bases=(models.Model, cookbook.models.PermissionModelMixin),
),
]

View File

@@ -1,19 +0,0 @@
# Generated by Django 3.2.11 on 2022-02-02 19:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0169_auto_20220121_1427'),
]
operations = [
migrations.AlterField(
model_name='ingredient',
name='unit',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='cookbook.unit'),
),
]

View File

@@ -1,20 +1,44 @@
# Generated by Django 3.2.11 on 2022-01-21 20:27
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
# Generated by Django 3.2.11 on 2022-02-07 17:48
import cookbook.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('cookbook', '0168_add_unit_searchfields'),
('cookbook', '0169_exportlog'),
]
operations = [
migrations.AddField(
model_name='food',
name='child_inherit_fields',
field=models.ManyToManyField(blank=True, related_name='child_inherit', to='cookbook.FoodInheritField'),
),
migrations.AddField(
model_name='food',
name='substitute',
field=models.ManyToManyField(blank=True, related_name='_cookbook_food_substitute_+', to='cookbook.Food'),
),
migrations.AddField(
model_name='food',
name='substitute_children',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='food',
name='substitute_siblings',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='ingredient',
name='unit',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cookbook.unit'),
),
migrations.CreateModel(
name='CustomFilter',
fields=[
@@ -29,13 +53,13 @@ class Migration(migrations.Migration):
],
bases=(models.Model, cookbook.models.PermissionModelMixin),
),
migrations.AddConstraint(
model_name='customfilter',
constraint=models.UniqueConstraint(fields=('space', 'name'), name='cf_unique_name_per_space'),
),
migrations.AddField(
model_name='recipebook',
name='filter',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cookbook.customfilter'),
),
migrations.AddConstraint(
model_name='customfilter',
constraint=models.UniqueConstraint(fields=('space', 'name'), name='cf_unique_name_per_space'),
),
]

View File

@@ -1,34 +0,0 @@
# Generated by Django 3.2.11 on 2022-02-02 19:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0170_alter_ingredient_unit'),
]
operations = [
migrations.AddField(
model_name='food',
name='substitute',
field=models.ManyToManyField(blank=True, related_name='_cookbook_food_substitute_+', to='cookbook.Food'),
),
migrations.AddField(
model_name='food',
name='substitute_children',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='food',
name='substitute_siblings',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='ingredient',
name='unit',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cookbook.unit'),
),
]

View File

@@ -1,18 +0,0 @@
# Generated by Django 3.2.11 on 2022-02-04 17:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cookbook', '0171_auto_20220202_1340'),
]
operations = [
migrations.AddField(
model_name='food',
name='child_inherit_fields',
field=models.ManyToManyField(blank=True, related_name='child_inherit', to='cookbook.FoodInheritField'),
),
]