Example #1
0
def system_cache(request):
	#get controller api
	api=ControllerAPI(request)
	status=api.getcachestatus()

	#rearrange
	def func(a,b):
		if a["id"]=="__global__":
			return -1		
		elif b["id"]=="__global__":
			return 1
		else:
			return a>b
	status.sort(func)

	#add labels
	for section in status:
		section["label"]="genel" if section["id"]=="__global__" else section["id"]

        #template context
	context=_get_context(request,section="admin",content="content_system_cache",status=status)

	#render
        return HttpResponse( get_template('template_content.html').render(Context(context)) )