from django import forms
from models import Transaction
from main.fields import CurrencyField

class TransactionForm(forms.ModelForm):
	""" ModelForm for :class:`Transactions <Transaction>` with a currency field """
	amount = CurrencyField(label='Betrag')
	class Meta:
		model = Transaction
		exclude = ('user', 'dateTime', 'checked')
	def clean_amount(self):
		data = self.cleaned_data['amount']
		return data
