Convert nutrition input from KJ to calories with preference

This commit is contained in:
xeals
2021-10-25 17:29:40 +11:00
parent 3d830a4449
commit c9ff0543e3
3 changed files with 20 additions and 2 deletions

View File

@@ -32,6 +32,9 @@
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
window.RECIPE_ID = {{ recipe.pk }}
window.DEFAULT_UNIT = '{{request.user.userpreference.default_unit}}'
window.USER_PREF = {
'use_kj': {% if request.user.userpreference.use_kj %} true {% else %} false {% endif %},
}
</script>