WeightsForm   A
last analyzed

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 10
1
# coding: utf-8
2
from dj_diabetes.models.weights import Weights
3
4
from django import forms
5
6
7
class WeightsForm(forms.ModelForm):
8
    """
9
        Weights Form
10
    """
11
    weight = forms.IntegerField(widget=forms.TextInput(
12
        {'class': 'form-control', 'type': 'number'}))
13
    date_weights = forms.DateField(widget=forms.TextInput(
14
        attrs={'class': 'form-control'}))
15
16
    class Meta:
17
        model = Weights
18
        fields = ['weight', 'date_weights']
19