@ajax_required
@get_unit_context('view')
def get_more_context(request, unit, **kwargs_):
 store = request.store
 json = {}
 gap = int(request.GET.get('gap', 0))
 qty = int(request.GET.get('qty', 1))
 json['ctx'] = _filter_ctx_units(store.units, unit, qty, gap)
 return JsonResponse(json)

@ ajax_required @ get_unit_context ( 'view' ) def get_more_context ( request , unit , ** kwargs_ ) : store = request . store json = { } gap = int ( request . GET . get ( 'gap' , 0 ) ) qty = int ( request . GET . get ( 'qty' , 1 ) ) json [ 'ctx' ] = _filter_ctx_units ( store . units , unit , qty , gap ) return JsonResponse ( json )
retrieves more context units .