<commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from django.db.models.functions import Lower

from meal.models import (
    COMPONENT_GROUP_CHOICES_MAIN_DISH, Component, Ingredient)


class DishIngredientsForm(forms.Form):
    maindish = forms.ModelChoiceField(
        label=_("Today's main dish:"),
        queryset=Component.objects.order_by(Lower('name')).filter(
            component_group=COMPONENT_GROUP_CHOICES_MAIN_DISH),
        widget=forms.Select(attrs={'class': 'ui dropdown maindish'}),
    )

    ingredients = forms.ModelMultipleChoiceField(
        label=_('Select Main Dish Ingredients:'),
        queryset=Ingredient.objects.order_by(Lower('name')).all(),
        widget=forms.SelectMultiple(
            attrs={'class': 'ui fluid search dropdown'}),
        required=False,
    )

    sides_ingredients = forms.ModelMultipleChoiceField(
        label=_('Select Sides Ingredients:'),
        queryset=Ingredient.objects.order_by(Lower('name')).all(),
        widget=forms.SelectMultiple(
            attrs={'class': 'ui fluid search dropdown'}),
        required=False,
    )

    def clean_sides_ingredients(self):
        data = self.cleaned_data['sides_ingredients']
        if not data:
            raise forms.ValidationError(
                _("Please choose some Sides ingredients"))
        return data
<commit_msg>Removed camel case in Pick ingredients fiels labels<commit_after>from django import forms
from django.utils.translation import ugettext_lazy as _
from django.db.models.functions import Lower

from meal.models import (
    COMPONENT_GROUP_CHOICES_MAIN_DISH, Component, Ingredient)


class DishIngredientsForm(forms.Form):
    maindish = forms.ModelChoiceField(
        label=_("Today's main dish:"),
        queryset=Component.objects.order_by(Lower('name')).filter(
            component_group=COMPONENT_GROUP_CHOICES_MAIN_DISH),
        widget=forms.Select(attrs={'class': 'ui dropdown maindish'}),
    )

    ingredients = forms.ModelMultipleChoiceField(
        label=_('Select main dish ingredients:'),
        queryset=Ingredient.objects.order_by(Lower('name')).all(),
        widget=forms.SelectMultiple(
            attrs={'class': 'ui fluid search dropdown'}),
        required=False,
    )

    sides_ingredients = forms.ModelMultipleChoiceField(
        label=_('Select sides ingredients:'),
        queryset=Ingredient.objects.order_by(Lower('name')).all(),
        widget=forms.SelectMultiple(
            attrs={'class': 'ui fluid search dropdown'}),
        required=False,
    )

    def clean_sides_ingredients(self):
        data = self.cleaned_data['sides_ingredients']
        if not data:
            raise forms.ValidationError(
                _("Please choose some Sides ingredients"))
        return data

{'fraction_non_alphanumeric': 0.10709219858156029, 'fraction_numerical': 0.0, 'mean_word_length': 3.326687116564417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5071987', 'n_tokens_mistral': 809, 'n_tokens_neox': 795, 'n_words': 157}