tcms.bugs.views module

class tcms.bugs.views.AddComment(**kwargs)[source]

Bases: View

dispatch(request, *args, **kwargs)
http_methods = ['post']
post(request)[source]
class tcms.bugs.views.Edit(**kwargs)[source]

Bases: UpdateView

dispatch(request, *args, **kwargs)
form_class

alias of NewBugForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_initial()[source]

Return the initial data to use for forms on this view.

get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

model

alias of Bug

template_name = 'bugs/mutable.html'
class tcms.bugs.views.Get(**kwargs)[source]

Bases: DetailView

dispatch(request, *args, **kwargs)
get_context_data(**kwargs)[source]

Insert the single object into the context dict.

http_method_names = ['get']
model

alias of Bug

template_name = 'bugs/get.html'
class tcms.bugs.views.New(**kwargs)[source]

Bases: CreateView

static assignee_from_components(components)[source]

Return the first owner which is assigned to any of the components. This is as best as we can to automatically figure out who should be assigned to this bug.

static create_bug(data)[source]

Helper method used within Issue Tracker integration.

Parameters:

data (dict) – Untrusted input, usually via HTTP request

Returns:

bug

Return type:

Model

dispatch(request, *args, **kwargs)
static find_assignee(data)[source]

Try to automatically find an assignee for Bug by first scanning TestCase components (if present) and then components for the product.

form_class

alias of NewBugForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

model

alias of Bug

template_name = 'bugs/mutable.html'
class tcms.bugs.views.Search(**kwargs)[source]

Bases: TemplateView

dispatch(request, *args, **kwargs)
get_context_data(**kwargs)[source]
template_name = 'bugs/search.html'