handlers
sensor.signals.handlers
¤
Attributes¤
User = get_user_model()
module-attribute
¤
Classes¤
Sensor
¤
Bases: PermissionsBase
Specific sensor details.
Attributes:
Name | Type | Description |
---|---|---|
sensor_id |
int
|
Primary key, sensor id. |
code |
(str) sensor code. |
|
sensor_type |
SensorType
|
sensor type. |
sensor_brand |
SensorBrand
|
sensor brand. |
model |
str
|
specific model of the sensor. |
serial |
str
|
serial number of the sensor. |
status |
bool
|
sensor status. |
Functions¤
__str__()
¤
Return the sensor code.
Source code in sensor\models.py
112 113 114 |
|
get_absolute_url()
¤
Return the absolute url of the sensor.
Source code in sensor\models.py
116 117 118 |
|
SensorBrand
¤
Bases: PermissionsBase
Brand of the sensor, eg. Davis, Texas Electronics, etc.
Attributes:
Name | Type | Description |
---|---|---|
brand_id |
int, primary key, sensor brand id. |
|
name |
str, sensor brand name. |
Functions¤
__str__()
¤
Return the brand name.
Source code in sensor\models.py
52 53 54 |
|
get_absolute_url()
¤
Return the absolute url of the sensor brand.
Source code in sensor\models.py
56 57 58 |
|
SensorType
¤
Bases: PermissionsBase
Type of sensor, eg. pluviometric, wind sensor, etc.
Attributes:
Name | Type | Description |
---|---|---|
sensor_type_id |
int, primary key, sensor type id. |
|
name |
str, sensor type name. |
Functions¤
__str__()
¤
Return the sensor type name.
Source code in sensor\models.py
32 33 34 |
|
get_absolute_url()
¤
Return the absolute url of the sensor type.
Source code in sensor\models.py
36 37 38 |
|
Functions¤
set_model_permissions(sender, **kwargs)
¤
Set model-level permissions.
Source code in sensor\signals\handlers.py
18 19 20 21 22 23 24 25 26 |
|
set_object_permissions(sender, instance, **kwargs)
¤
Set object-level permissions".
Source code in sensor\signals\handlers.py
10 11 12 13 14 15 |
|