mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
getUserPreference available for all UserPreferences
This commit is contained in:
24
cookbook/migrations/0163_create_food_ignore_fields.py
Normal file
24
cookbook/migrations/0163_create_food_ignore_fields.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from cookbook.models import FoodParentIgnore
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def create_ignorefields(apps, schema_editor):
|
||||
FoodParentIgnore.objects.create(name='Supermarket Category', field='name')
|
||||
FoodParentIgnore.objects.create(name='Ignore Shopping', field='ignore_shopping')
|
||||
FoodParentIgnore.objects.create(name='Diet', field='diet')
|
||||
FoodParentIgnore.objects.create(name='Substitute', field='substitute')
|
||||
FoodParentIgnore.objects.create(name='Substitute Children', field='substitute_children')
|
||||
FoodParentIgnore.objects.create(name='Substitute Siblings', field='substitute_siblings')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0162_food_inherit'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
create_ignorefields
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user