Self hosted FLOSS fitness/workout, nutrition and weight tracker
Merge branch 'master' into feature/rework-nutrition-units
Roland Geiderd7cafdfc7a45
diff --cc wger/nutrition/consts.pyindex 375196364,e55ec57ed..bf3dcb38e--- a/wger/nutrition/consts.py+++ b/wger/nutrition/consts.py@@@ -14,6 -14,25 +14,21 @@@# You should have received a copy of the GNU Affero General Public License# along with this program. If not, see <http://www.gnu.org/licenses/>.+ # Standard Library+ import enum+++ class SyncMode(enum.Enum):+ """+ Mode for ingredient sync/import scripts.++ INSERT: bulk-insert new ingredients (very fast, use for empty databases)+ UPDATE: update existing ingredients or create new ones (slower, 2 queries per product)+ """++ INSERT = enum.auto()+ UPDATE = enum.auto()+--MEALITEM_WEIGHT_GRAM = '1'-MEALITEM_WEIGHT_UNIT = '2'-ENERGY_FACTOR = {'protein': {'kg': 4, 'lb': 113},'carbohydrates': {'kg': 4, 'lb': 113},