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.
14 lines
411 B
14 lines
411 B
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
|