khaganat-web/logs/forms.py

15 lines
395 B
Python
Raw Normal View History

from django.utils.translation import gettext_lazy as _
from django.forms.widgets import DateInput
from django import forms
import datetime
class SearchForm(forms.Form):
source = forms.CharField(max_length=128)
date = forms.DateField(
label=_('date'),
initial=datetime.date.today(),
widget=DateInput(format='%d-%m-%Y'),
input_formats=['%d-%m-%Y'],
)