Esempio n. 1
0
def show_hardware_task_list(context, object_list, sort="hardware_task_sort"):
    request = context['request']
    web = webs.hardware_task_web()
    dict = defaults(context)
    dict['table'] = tables.hardware_task(request, web, object_list,request.GET.get(sort))
    dict['rows'] = dict['table'].rows
    dict['web'] = web
    dict['sort'] = sort
    return dict
Esempio n. 2
0
def hardware_task_delete(request,object_id):
    web = webs.hardware_task_web()
    object = get_object_or_404(models.hardware_task, pk=object_id)
    return web.object_delete(request, object)
Esempio n. 3
0
def task_add_hardware(request, object_id):
    web = webs.hardware_task_web()
    task = get_object_or_404(models.task, pk=object_id)
    return web.object_add(request, kwargs={ 'task': task })