Source

django-pim / pcbank / forms.py

from django import forms
from pcbank.models import Bill, Cheque, Income, CreditCard, Payee, Bank,\
    Roommate

class IncomeForm(forms.ModelForm):
    class Meta:
        model = Income

class CreditCardForm(forms.ModelForm):
    class Meta:
        model = CreditCard

class PayeeForm(forms.ModelForm):
    class Meta:
        model = Payee

class BillForm(forms.ModelForm):
    class Meta:
        model = Bill

class BankForm(forms.ModelForm):
    class Meta:
        model = Bank

class RoommateForm(forms.ModelForm):
    class Meta:
        model = Roommate

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

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

class UploadChequeForm(forms.ModelForm):
    class Meta:
        model = Cheque
        fields = ('image',)