ferrosoft.apps.ticketing package

Subpackages

Submodules

ferrosoft.apps.ticketing.admin module

ferrosoft.apps.ticketing.apps module

class ferrosoft.apps.ticketing.apps.TicketingConfig(app_name, app_module)[source]

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField'
name = 'ferrosoft.apps.ticketing'
verbose_name = 'Ticketing'

ferrosoft.apps.ticketing.forms module

class ferrosoft.apps.ticketing.forms.TicketCommentForm(*args, **kwargs)[source]

Bases: ModelForm

class Meta[source]

Bases: object

fields = ['content']
model

alias of Comment

widgets = {'content': <django.forms.widgets.Textarea object>}
base_fields = {'content': <django.forms.fields.CharField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

class ferrosoft.apps.ticketing.forms.TicketCreationForm(*args, **kwargs)[source]

Bases: ModelForm

class Meta[source]

Bases: object

fields = ['title', 'type', 'priority', 'description', 'attachment']
model

alias of Ticket

base_fields = {'attachment': <django.forms.fields.FileField object>, 'description': <django.forms.fields.CharField object>, 'priority': <django.forms.fields.ChoiceField object>, 'title': <django.forms.fields.CharField object>, 'type': <django.forms.fields.ChoiceField object>}
declared_fields = {'attachment': <django.forms.fields.FileField object>, 'priority': <django.forms.fields.ChoiceField object>, 'type': <django.forms.fields.ChoiceField object>}
property media

Return all media required to render the widgets on this form.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

ferrosoft.apps.ticketing.models module

class ferrosoft.apps.ticketing.models.Comment(id, ticket, content, created_at, created_by)[source]

Bases: UUIDModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

content

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

created_at

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

created_by

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

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, 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>
save(*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.

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.

ticket_id
class ferrosoft.apps.ticketing.models.Settings(id, name)[source]

Bases: UUIDModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

classmethod get_instance()[source]
get_ticket_type_options(ticket_type)[source]
Return type:

TicketTypeProjectOption

id

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

name

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_type_projects

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 ferrosoft.apps.ticketing.models.TaigaProject(id, name, project_id, types, priorities)[source]

Bases: UUIDModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_priority_id(priority_label)[source]
Return type:

int

get_type_id(ticket_type_label)[source]
Return type:

int

id

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

name

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>
priorities

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

project_id

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

ticket_type_options

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.

types

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

class ferrosoft.apps.ticketing.models.Ticket(id, reference, created_by, foreign_id, title, description, created_at, type, priority, attachment)[source]

Bases: UUIDModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

attachment

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
attachment_upload_path(filename)[source]
comments

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.

created_at

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

created_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.

created_by_id
description

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

foreign_id

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]
Return type:

str

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_priority_display(*, field=<django.db.models.fields.CharField: priority>)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
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>
priority

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

reference

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

title

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

type

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

class ferrosoft.apps.ticketing.models.TicketPriority(*values)[source]

Bases: TextChoices

High = 'H'
NORMAL = 'N'
class ferrosoft.apps.ticketing.models.TicketType(*values)[source]

Bases: TextChoices

BUG = 'B'
FEATURE_REQUEST = 'F'
SUPPORT = 'S'
class ferrosoft.apps.ticketing.models.TicketTypeProjectOption(id, settings, ticket_type, project)[source]

Bases: UUIDModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

classmethod create_association(project_id, ticket_type)[source]
classmethod delete_association(project_id, ticket_type)[source]
get_ticket_type_display(*, field=<django.db.models.fields.CharField: ticket_type>)
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>
project

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.

project_id
settings

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.

settings_id
ticket_type

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

ferrosoft.apps.ticketing.tasks module

async ferrosoft.apps.ticketing.tasks.add_comment(ticket_id: str, content: str) None[source]
Return type:

None

async ferrosoft.apps.ticketing.tasks.create_ticket(ticket: Ticket) None[source]
Return type:

None

async ferrosoft.apps.ticketing.tasks.send_ticket_email(ticket_url: str, email: str, ticket: Ticket) None[source]
Return type:

None

ferrosoft.apps.ticketing.tests module

ferrosoft.apps.ticketing.urls module

ferrosoft.apps.ticketing.views module

class ferrosoft.apps.ticketing.views.AddCommentView(**kwargs)[source]

Bases: LoginRequiredMixin, CreateView

form_class

alias of TicketCommentForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

model

alias of Comment

template_name = 'ticketing/comment.html'
class ferrosoft.apps.ticketing.views.TicketCreateView(**kwargs)[source]

Bases: LoginRequiredMixin, PlatformActivityMixin, CreateView

activity_title = 'New ticket'

Activity title should be a very short label e.g. indicating the current model being operated on.

form_class

alias of TicketCreationForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

template_name = 'ticketing/index.html'
class ferrosoft.apps.ticketing.views.TicketDetailView(**kwargs)[source]

Bases: LoginRequiredMixin, PlatformActivityMixin, DetailView

activity_title = 'Ticket'

Activity title should be a very short label e.g. indicating the current model being operated on.

context_object_name = 'ticket'
get_context_data(**kwargs)[source]

Inject activity metadata (title, app, container, help URL) into the context.

Raises:

RuntimeError – If neither activity_app nor a string template_name is defined and the app label cannot be inferred.

model

alias of Ticket

template_name = 'ticketing/ticket_detail.html'