physics_workload.app.tables.staff

Attributes

Classes

StaffTable

Table displaying details of staff.

Module Contents

physics_workload.app.tables.staff.logger: logging.Logger
class physics_workload.app.tables.staff.StaffTable(**kwargs)

Bases: iommi.Table

Table displaying details of staff.

Includes status filter and staff balances only if the user is allowed, otherwise they can only see their own balance.

Parameters:
  • rows – a list or QuerySet of objects

  • columns – (use this only when not using the declarative style) a list of Column objects

  • attrs – dict of strings to string/callable of HTML attributes to apply to the table

  • row__attrs – dict of strings to string/callable of HTML attributes to apply to the row. Callables are passed the row as argument.

  • row__template – name of template (or Template object) to use for rendering the row

  • bulk_filter – filters to apply to the QuerySet before performing the bulk operation

  • bulk_exclude – exclude filters to apply to the QuerySet before performing the bulk operation

  • sortable – set this to False to turn off sorting for all columns

class Meta
auto
columns
query
iommi_style
static filter_status_into_query(value_string_or_f: str) django.db.models.Q
static annotate_rows(rows: django.db.models.QuerySet) django.db.models.QuerySet

Adds the load balance to the table rows, derived from the load columns. :param rows: The query to annotate. :return: The annotated query, with a ‘load_balance’ column.