This commit is contained in:
relikd
2023-05-29 15:20:07 +02:00
commit 1380b156d8
126 changed files with 3612 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
from django import forms
class DateWithNow(forms.DateInput):
template_name = 'forms/widgets/date.html'
def __init__(self, attrs=None, format=None):
rv = attrs or {}
rv['type'] = 'date'
super().__init__(rv, format='%Y-%m-%d')
# OR: prevent super from converting dateformat.date to str
# def format_value(self, value: date) -> date:
# return value