tcms.bugs.views module

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

Bases: django.views.generic.base.View

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

Bases: django.views.generic.edit.UpdateView

dispatch(request, *args, **kwargs)
fields = ['summary', 'assignee', 'reporter', 'product', 'version', 'build']
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_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 tcms.bugs.models.Bug

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

Bases: django.views.generic.detail.DetailView

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

http_method_names = ['get']
model

alias of tcms.bugs.models.Bug

render_to_response(context, **response_kwargs)[source]

Return a response, using the response_class for this view, with a template rendered with the given context.

Pass response_kwargs to the constructor of the response class.

response_class

alias of tcms.core.response.ModifySettingsTemplateResponse

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

Bases: django.views.generic.edit.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 tcms.bugs.forms.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 tcms.bugs.models.Bug

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

Bases: django.views.generic.base.TemplateView

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