Update forms.py

This commit is contained in:
tcely authored and GitHub committed 2025-05-26 06:08:49 -04:00
1 parent a80950ee16
commit 5ddf0208b2
1 file changed
+12 -1
+12 -1
View File
@@ -2,13 +2,24 @@
from django import forms, VERSION as DJANGO_VERSION
from django.utils.translation import gettext_lazy as _
from .models import Source
if DJANGO_VERSION[0:3] < (5, 0, 0):
_assume_scheme = dict()
else:
# Silence RemovedInDjango60Warning
_assume_scheme = dict(assume_scheme='http')
SourceForm = forms.modelform_factory(
Source,
widgets = {
'target_schedule': forms.DateTimeInput(
attrs={'type': 'datetime-local'},
),
},
)
class ValidateSourceForm(forms.Form):
source_type = forms.CharField(