from django import forms
from home.models import Dish, Categori


class CategoriForm(forms.ModelForm):


    class Meta:
        model = Categori
        fields = ['name']


class DishForm(forms.ModelForm):
    categori = forms.ModelChoiceField(queryset=Categori.objects.all(),
        to_field_name='name')


    class Meta:
        model = Dish
        fields = ['name', 'image', 'price', 'categori', 'enabled']

6da5e5f473dd1a33f2b9b017b505b866c568cc9b
<mask token>


class DishForm(forms.ModelForm):
    <mask token>


    class Meta:
        model = Dish
        fields = ['name', 'image', 'price', 'categori', 'enabled']

<mask token>


class DishForm(forms.ModelForm):
    categori = forms.ModelChoiceField(queryset=Categori.objects.all(),
        to_field_name='name')


    class Meta:
        model = Dish
        fields = ['name', 'image', 'price', 'categori', 'enabled']

<mask token>


class CategoriForm(forms.ModelForm):


    class Meta:
        model = Categori
        fields = ['name']


class DishForm(forms.ModelForm):
    categori = forms.ModelChoiceField(queryset=Categori.objects.all(),
        to_field_name='name')


    class Meta:
        model = Dish
        fields = ['name', 'image', 'price', 'categori', 'enabled']

from django import forms
from home.models import Dish, Categori


class CategoriForm(forms.ModelForm):


    class Meta:
        model = Categori
        fields = ['name']


class DishForm(forms.ModelForm):
    categori = forms.ModelChoiceField(queryset=Categori.objects.all(),
        to_field_name='name')


    class Meta:
        model = Dish
        fields = ['name', 'image', 'price', 'categori', 'enabled']
