Add KJ user preference

This commit is contained in:
xeals
2021-10-25 17:25:35 +11:00
parent e33daf7b3e
commit b1b770c9e5
5 changed files with 25 additions and 2 deletions

View File

@ -39,7 +39,7 @@ class UserPreferenceForm(forms.ModelForm):
class Meta:
model = UserPreference
fields = (
'default_unit', 'use_fractions', 'theme', 'nav_color',
'default_unit', 'use_fractions', 'use_kj', 'theme', 'nav_color',
'sticky_navbar', 'default_page', 'show_recent', 'search_style',
'plan_share', 'ingredient_decimals', 'shopping_auto_sync',
'comments'
@ -52,6 +52,7 @@ class UserPreferenceForm(forms.ModelForm):
'use_fractions': _(
'Enables support for fractions in ingredient amounts (e.g. convert decimals to fractions automatically)'),
# noqa: E501
'use_kj': _('Display nutritional energy amounts in joules instead of calories'), # noqa: E501
'plan_share': _(
'Users with whom newly created meal plan/shopping list entries should be shared by default.'),
# noqa: E501