FoodsAdminForm   A
last analyzed

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 10
1
# coding: utf-8
2
from dj_diabetes.models import Preferences
3
from dj_diabetes.models.appointments import AppointmentTypes
4
from dj_diabetes.models.exams import ExaminationTypes
5
from dj_diabetes.models.foods import Foods
6
from dj_diabetes.models.sports import Sports
7
8
from django import forms
9
10
11
# ADMIN FORMS Part
12
class ExaminationTypesAdminForm(forms.ModelForm):
13
    """
14
        Manage the examination types
15
    """
16
    class Meta:
17
        model = ExaminationTypes
18
        fields = ['title']
19
20
21
class AppointmentTypesAdminForm(forms.ModelForm):
22
23
    """
24
        Manage the appointment types
25
    """
26
    class Meta:
27
        model = AppointmentTypes
28
        fields = ['title']
29
30
31
class FoodsAdminForm(forms.ModelForm):
32
33
    """
34
        Manage the Foods
35
    """
36
    class Meta:
37
        model = Foods
38
        fields = ['title']
39
40
41
class SportsAdminForm(forms.ModelForm):
42
43
    """
44
        Manage the sports
45
    """
46
    class Meta:
47
        model = Sports
48
        fields = ['title']
49
50
51
class PrefAdminForm(forms.ModelForm):
52
53
    """
54
        Manage the preferences
55
    """
56
    class Meta:
57
        model = Preferences
58
        fields = ['key', 'title', 'value']
59