You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
315 B
12 lines
315 B
14 years ago
|
from django import forms
|
||
|
from models import Transaction
|
||
|
from main.fields import CurrencyField
|
||
|
|
||
|
class TransactionForm(forms.ModelForm):
|
||
|
amount = CurrencyField()
|
||
|
class Meta:
|
||
|
model = Transaction
|
||
|
exclude = ('user', 'dateTime', 'checked')
|
||
|
def clean_amount(self):
|
||
|
data = self.cleaned_data['amount']
|
||
|
return data
|