示例#1
0
def issueCreate(request):
    """
    Given request, render what extra stuff is needed for Machines
    """
    args = { 'statusForm' : forms.itemStatusForm(), }
    return render_to_string('issueCreate.html', args,
            context_instance=RequestContext(request))
示例#2
0
def issueCreateSave(request, item=None, group=None):
    """
    Hook for handling saving of issue creation, returns True/False
    """

    if item == None and group == None:
        return True

    data = request.POST.copy()

    # update the statuses for the issue
    # instance passed is an issue, so we need to get the Machine out of it
    form = forms.itemStatusForm(data)

    if form.is_valid():
        return form.save(machine=item, group=group)

    return False