Looking for django Keywords? Try Ask4Keywords

Django Exemple ModelForm


Exemple

Créez un ModelForm à partir d'une classe Model existante, en sous- ModelForm :

from django import forms

class OrderForm(forms.ModelForm):
    class Meta:
        model = Order
        fields = ['item', 'order_date', 'customer', 'status']