Exemplo n.º 1
0
def render(request, template, data):
	user = request.user
	user.perms = PERMS = {}
	for p in user.get_all_permissions():
		app, name = p.split(".")
		sub = PERMS.get(app, None)
		if sub is None:
			sub = {}
			PERMS[app] = sub

		sub[name] = True
	data["user"] = user
	return drender(request, template, data)
Exemplo n.º 2
0
def render(name, request, data={}):
    data["request"] = request
    return drender(request, name, data)
Exemplo n.º 3
0
def render(name, request, data={}):
    data["request"] = request
    return drender(request, name, data)