helpdesk.models module

class helpdesk.models.Queue(*args, **kwargs)[source]

Bases: django.db.models.base.Model

A Queue is a container for a category of Tickets.

Each Ticket has a ForeignKey relationship to a specific Queue. A Queue is managed by a specific Group specific by managing_group, and can be responsed to by users in a set of groups defined by the response_groups field.

A Queue is visible only to users in managing or response groups, and is thus admin/internal only.

Permissions are handled at object level using django_guardian.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

slug

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

managing_group

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

response_groups

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

parent_queue

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

objects = <django.db.models.manager.ManagerFromQueueQuerySet object>
get_absolute_url()[source]
property nr_unassigned
property nr_assigned
property nr_resolved
property nr_closed
property nr_awaiting_handling
property nr_in_handling
property nr_handled
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

managing_group_id
parent_queue_id
sub_queues

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

tickets

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class helpdesk.models.Ticket(*args, **kwargs)[source]

Bases: django.db.models.base.Model

User-created ticket, representing a query or request for assistance.

Each ticket lives in a Queue.

queue

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

publicly_visible

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

defined_on

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

defined_by

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

priority

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deadline

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

assigned_to

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

concerning_object_type

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

concerning_object_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

concerning_object

Provide a generic many-to-one relation through the content_type and object_id fields.

This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.

objects = <django.db.models.manager.ManagerFromTicketQuerySet object>
get_absolute_url()[source]
latest_followup()[source]
property latest_activity
property is_unassigned
property is_awaiting_handling
property is_in_handling
property is_handled
property is_open

Return True if the Ticket hasn’t been resolved or closed.

property priority_level
property status_classes
property progress_level

For fa box checking: 0 if unassigned, 1 if assigned, 2 if in handling, 3 if handled.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

assigned_to_id
concerning_object_type_id
defined_by_id
followups

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_next_by_defined_on(*, field=<django.db.models.fields.DateTimeField: defined_on>, is_next=True, **kwargs)
get_previous_by_defined_on(*, field=<django.db.models.fields.DateTimeField: defined_on>, is_next=False, **kwargs)
get_priority_display(*, field=<django.db.models.fields.CharField: priority>)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

queue_id
class helpdesk.models.Followup(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Response concerning a Ticket, from either the user or handler.

ticket

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

text

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

by

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

timestamp

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

action

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_absolute_url()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

by_id
get_action_display(*, field=<django.db.models.fields.CharField: action>)
get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
ticket_id