arrowcounter/counter/forms.py

19 lines
438 B
Python
Raw Normal View History

2018-08-09 16:06:25 +00:00
from django import forms
from django.conf import settings
2019-07-26 21:32:50 +00:00
from .models import ArrowCount, Target
2018-08-09 16:06:25 +00:00
class ArrowCountForm(forms.ModelForm):
date = forms.DateField(widget=forms.DateInput(
format='%Y-%m-%d',
attrs={'class': 'datepicker'}))
class Meta:
model = ArrowCount
fields = ['date', 'count']
2019-07-26 21:32:50 +00:00
class TargetForm(forms.ModelForm):
class Meta:
model = Target
fields = ['target']