Source

django-pim / pcbank / forms.py

from django import forms
from pcbank.models import Bill, Cheque

class NewBillForm(forms.ModelForm):
    class Meta:
        model = Bill
        fields = ('amount',)

class NewChequeForm(forms.ModelForm):
    class Meta:
        model = Cheque
        exclude = ('transaction',)