mirror of
https://github.com/Lyxminxx/jast.git
synced 2026-10-11 12:51:51 +02:00
12 lines
362 B
Python
12 lines
362 B
Python
from django import forms
|
|
from .models import Transaction
|
|
|
|
class TransactionForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Transaction
|
|
fields = ['title', 'amount', 'category', 'date']
|
|
# This widget forces the browser to show a date picker calendar
|
|
widgets = {
|
|
'date': forms.DateInput(attrs={'type': 'date'}),
|
|
}
|