Exemple #1
0
def show_os_list(context, object_list, sort="os_sort"):
    request = context['request']
    web = webs.os_web()
    dict = defaults(context)
    dict['table'] = tables.os(request, web, object_list,request.GET.get(sort))
    dict['rows'] = dict['table'].rows
    dict['web'] = web
    dict['sort'] = sort
    return dict
Exemple #2
0
def os_delete(request,object_id):
    web = webs.os_web()
    object = get_object_or_404(models.os, pk=object_id)
    return web.object_delete(request, object)
Exemple #3
0
def os_add(request, object_id):
    web = webs.os_web()
    storage = get_object_or_404(models.storage, pk=object_id)
    return web.object_add(request, kwargs={ 'storage': storage })