Blame view

src/core/pyros_django/dashboard/forms.py 1.61 KB
e31b2208   theophile.puhl@epitech.eu   Severals Changes ...
1
from django import forms
2c61f856   theopuhl   Url change to pat...
2
from common.models import Config, PyrosUser
e31b2208   theophile.puhl@epitech.eu   Severals Changes ...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

class ConfigForm(forms.ModelForm):
    class Meta:
        model = Config
        fields = ('latitude',
                  'local_time_zone',
                  'longitude',
                  'altitude',
                  'horizon_line',
                  'row_data_save_frequency',
                  'request_frequency',
                  'analysed_data_save',
                  'telescope_ip_address',
                  'camera_ip_address',
                  'plc_ip_address',)
        labels = {
            'latitude': ('Latitude :'),
            'local_time_zone': ('Local Time Zone :'),
            'longitude': ('Longitude :'),
            'altitude': ('Altitude :'),
            'horizon_line': ('Horizon Line :'),
            'row_data_save_frequency': ('Row Data Save Frequency :'),
            'request_frequency': ('Request Frequency :'),
            'analysed_data_save': ('Analysed Data Save :'),
            'telescope_ip_address': ('Ip Address :'),
            'camera_ip_address': ('Ip Address :'),
            'plc_ip_address': ('Ip Address :'),
2c61f856   theopuhl   Url change to pat...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        }

class UserForm(forms.ModelForm):
    class Meta:
        model = PyrosUser
        fields = ('username',
                  'first_name',
                  'last_name',
                  'country',
                  'user_level',
                  'desc',
                  'tel',
                  'address',
                  'laboratory',
                  'last_connect',
                  'cur_connect',
                  'putvalid_beg',
                  'putvalid_end',
                  'quota',)