Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add steps on how to update fixtures

Roland Geider621ae621814a
diff --cc extras/scripts/create_ingredients_from_foodfacts.py
index 47dec2969,36e4a5ec6..a252d8d77
--- a/extras/scripts/create_ingredients_from_foodfacts.py
+++ b/extras/scripts/create_ingredients_from_foodfacts.py
@@@ -35,7 -35,6 +35,7 @@@ and create all ingredients
* Requirements:
- pip3 install pymongo
++pip3 install pymongo zip
apt-get install mongo-tools # (for mongorestore)
* Steps:
@@@ -58,9 -57,6 +58,12 @@@ docker stop wger_mong
docker rm wger_mongo
rm openfoodfacts-mongodbdump.tar.gz
rm -r dump
+
+# Update ingredient fixture
- python3 manage.py dumpdata nutritrion.ingredient > extras/scripts/
++python3 manage.py dumpdata nutrition.ingredient > extras/scripts/data.json
++cd extras/scripts/
++python3 python3 filter-fixtures.py
++zip ingredients.json.zip ingredients.json
"""