def show_data_list(context, object_list, sort="data_sort"): request = context['request'] web = webs.data_web() dict = defaults(context) dict['table'] = tables.data(request, web, object_list,request.GET.get(sort)) dict['rows'] = dict['table'].rows dict['web'] = web dict['sort'] = sort return dict
def data_delete(request,object_id): web = webs.data_web() object = get_object_or_404(models.data, pk=object_id) return web.object_delete(request, object)
def data_add(request): web = webs.data_web() template = 'lintory/object_file_edit.html' return web.object_add(request, template=template)
def data_edit(request, object_id): web = webs.data_web() template = 'lintory/object_file_edit.html' object = get_object_or_404(models.data, pk=object_id) return web.object_edit(request, object, template=template)
def data_list(request): web = webs.data_web() filter = filters.data(request.GET or None) table = tables.data(request, web, filter.qs, order_by=request.GET.get('sort')) return web.object_list(request, filter.form, table)