Models¶
- class
festivalgrid.models.
APIUser
(id, username, password, token)[source]¶ - Parameters
id (AutoField) – Id
username (CharField) – Username
password (CharField) – Password
token (CharField) – Token
- exception
DoesNotExist
¶
- exception
MultipleObjectsReturned
¶
-
id
¶ Model field: ID
-
objects
= <django.db.models.manager.Manager object>¶
-
password
¶ Model field: password
-
token
¶ Model field: token
-
username
¶ Model field: username
- class
festivalgrid.models.
Connection
(id, plug, socket, geojson)[source]¶ - Parameters
- exception
DoesNotExist
¶
- exception
MultipleObjectsReturned
¶
-
geojson
¶ Model field: geojson
-
id
¶ Model field: ID
-
objects
= <django.db.models.manager.Manager object>¶
-
plug_id
¶ Model field: plug
-
socket_id
¶ Model field: socket
- class
festivalgrid.models.
Device
(id, name, template, mqtt_topic, ip, hostname, mac)[source]¶ - Parameters
id (AutoField) – Id
name (CharField) – Name
template (CharField) – Template
mqtt_topic (CharField) – Mqtt topic
ip (GenericIPAddressField) – Ip
hostname (CharField) – Hostname
mac (CharField) – Mac
- exception
DoesNotExist
¶
- exception
MultipleObjectsReturned
¶
-
hostname
¶ Model field: hostname
-
id
¶ Model field: ID
-
ip
¶ Model field: ip
-
mac
¶ Model field: mac
-
mqtt_topic
¶ Model field: mqtt topic
-
name
¶ Model field: name
-
objects
= <django.db.models.manager.Manager object>¶
-
template
¶ Model field: template
- class
festivalgrid.models.
ImageLayer
(id, image, latitude1, longitude1, latitude2, longitude2, latitude3, longitude3)[source]¶ - Parameters
id (AutoField) – Id
image (FileField) – Image
latitude1 (DecimalField) – Latitude1
longitude1 (DecimalField) – Longitude1
latitude2 (DecimalField) – Latitude2
longitude2 (DecimalField) – Longitude2
latitude3 (DecimalField) – Latitude3
longitude3 (DecimalField) – Longitude3
- exception
DoesNotExist
¶
- exception
MultipleObjectsReturned
¶
-
id
¶ Model field: ID
-
latitude1
¶ Model field: latitude1
-
latitude2
¶ Model field: latitude2
-
latitude3
¶ Model field: latitude3
-
longitude1
¶ Model field: longitude1
-
longitude2
¶ Model field: longitude2
-
longitude3
¶ Model field: longitude3
-
objects
= <django.db.models.manager.Manager object>¶
- class
festivalgrid.models.
Node
(id, name, device, warning_level, shutdown_level, cut_power, latitude, longitude)[source]¶ - Parameters
id (AutoField) – Id
name (CharField) – Name
device (ForeignKey to
Device
) – Devicewarning_level (IntegerField) – Warning level
shutdown_level (IntegerField) – Shutdown level
cut_power (BooleanField) – Cut power
latitude (DecimalField) – Latitude
longitude (DecimalField) – Longitude
- exception
DoesNotExist
¶
- exception
MultipleObjectsReturned
¶
-
cut_power
¶ Model field: cut power
-
device_id
¶ Model field: device
-
id
¶ Model field: ID
-
latitude
¶ Model field: latitude
-
longitude
¶ Model field: longitude
-
name
¶ Model field: name
-
objects
= <django.db.models.manager.Manager object>¶
-
plugs
¶ Model field: plug, accesses the M2M
Connection
model.
-
save
(force_insert=False, force_update=False, *args, **kwargs)[source]¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
shutdown_level
¶ Model field: shutdown level
-
sockets
¶ Model field: socket, accesses the M2M
Connection
model.
-
warning_level
¶ Model field: warning level
- class
festivalgrid.models.
Timer
(id, name, node, time, action, enabled)[source]¶ - Parameters
id (AutoField) – Id
name (CharField) – Name
node (ForeignKey to
Node
) – Nodetime (TimeField) – Time
action (CharField) – Action
enabled (BooleanField) – Enabled
-
ACTION_CHOICES
= (('ON', 'On'), ('OFF', 'Off'), ('TOGGLE', 'Toggle'))¶
- exception
DoesNotExist
¶
- exception
MultipleObjectsReturned
¶
-
action
¶ Model field: action
-
enabled
¶ Model field: enabled
-
get_action_display
(*, field=<django.db.models.fields.CharField: action>)¶ Autogenerated: Shows the label of the
action
-
id
¶ Model field: ID
-
name
¶ Model field: name
-
node_id
¶ Model field: node
-
objects
= <django.db.models.manager.Manager object>¶
-
time
¶ Model field: time