gcampus.core
#
- class gcampus.core.models.Measurement(*args, **kwargs)#
Bases:
DateModelMixin
The measurement model plays a central role in GewässerCampus. It aggregates measured values through the related field
parameters
. A user that is logged in with angcampus.auth.models.AccessKey
can create measurements. Their access key will be associated with the created measurement with thetoken
field.- all_objects = <django.db.models.manager.Manager object>#
By default,
objects
should only return measurements that are not hidden. To get all measurements (e.g. in the admin interface), use this manager.
- comment#
Additional comment (or ‘note’) for the measurement. Note that there is also a comment field in the
Parameter
model.
Hidden measurements appear to the user as being deleted. To avoid data loss, deleting a measurement will only mark is as hidden.
- objects = <gcampus.core.models.measurement.HiddenManager object>#
The default manager without hidden measurements.
- token: ForeignKey#
The token is used to link a measurement to a specific access key.
- class gcampus.core.models.ParameterType(id, name, short_name, unit, identifier, category, color, lower_warning_limit, upper_warning_limit)#
Bases:
Model
- class gcampus.core.models.Parameter(id, created_at, updated_at, parameter_type, value, measurement, comment, hidden)#
Bases:
DateModelMixin