from django import forms from django.conf import settings from .models import ArrowCount, Target class ArrowCountForm(forms.ModelForm): date = forms.DateField(widget=forms.DateInput( format='%Y-%m-%d', attrs={'class': 'datepicker'})) class Meta: model = ArrowCount fields = ['date', 'count'] class TargetForm(forms.ModelForm): class Meta: model = Target fields = ['target']