• Home
  • API Documentation
  • wte.views.timed_tasks – Timed Tasks Backend

wte.views.timed_tasks – Timed Tasks Backend¶

The timed_task module provides the functionality for creating, viewing, editing, and deleting TimedTask.

Routes are defined in init().

class wte.views.timed_tasks.EditTimedTaskSchema(options=None, **kwargs)[source]¶
The EditTimedTaskSchema handles the

validation of changes to a TimedTask.

By default it only expects to validate date (YYYY-MM-DDD) and time (HH:MM) fields. An additional options field is added, if the options parameter is passed to the constructor. In this case the EditTimedTaskSchema expects the additional field-names in the submitted form to have names in the format “options.{field-name}”.

Messages

badDictType:
The input must be dict-like (not a %(type)s: %(value)r)
badType:
The input must be a string (not a %(type)s: %(value)r)
empty:
Please enter a value
missingValue:
Missing value
noneType:
The input must be a string (not None)
notExpected:
The input field %(name)s was not expected.
singleValueExpected:
Please provide only one value
date = None¶

The task’s updated date

time = None¶

The tasks’s updatet time

class wte.views.timed_tasks.NewTimedTaskSchema(*args, **kw)[source]¶
The NewTimedTaskSchema handles the
validation of a new TimedTask.

Messages

badDictType:
The input must be dict-like (not a %(type)s: %(value)r)
badType:
The input must be a string (not a %(type)s: %(value)r)
empty:
Please enter a value
missingValue:
Missing value
noneType:
The input must be a string (not None)
notExpected:
The input field %(name)s was not expected.
singleValueExpected:
Please provide only one value
name = None¶

The new task’s name

wte.views.timed_tasks.delete_part_task(request)[source]¶

Handles the parts/{pid}/timed-tasks/{tid}/delete URL, providing the UI and backend for deleting an existing TimedTask that belongs to a Part.

Requires that the user has “edit” rights on the Part.

wte.views.timed_tasks.edit_part_task(request)[source]¶

Handles the parts/{pid}/timed-tasks/{tid}/edit URL, providing the UI and backend for editing an existing TimedTask that belongs to a Part.

Requires that the user has “edit” rights on the Part.

wte.views.timed_tasks.init(config)[source]¶

Adds the timed-task-specific backend routes (route name, URL pattern handler):

  • parts.timed_tasks – /parts/{pid}/timed-tasks – view_part_tasks()
  • parts.timed_tasks.new – /parts/{pid}/timed-tasks/new – new_part_task()
  • parts.timed_tasks.edit – /parts/{pid}/timed-tasks/{tid}/edit – edit_part_task()
  • parts.timed_tasks.delete – /parts/{pid}/timed-tasks/{tid}/delete – delete_part_task()
wte.views.timed_tasks.new_part_task(request)[source]¶

Handles the parts/{pid}/timed-tasks/new URL, providing the UI and backend for creating a new TimedTasks for a given Part.

Requires that the user has “edit” rights on the Part.

wte.views.timed_tasks.view_part_tasks(request)[source]¶

Handles the parts/{pid}/timed-tasks URL, displaying the TimedTasks for the given Part.

Requires that the user has “edit” rights on the Part.

  • wte.views.part – Part Backend
  • wte.views.user – User functionality view handlers