All pastes #175648 Raw Edit

Mine

public python v1 · immutable
·published 2006-09-18 23:58 UTC
rendered paste body
def index(request):        username = request.user.username        u = User.objects.get(username=username)        userperms = u.get_profile().permissions        if userperms == 'TE':                is_teacher = True                return render_to_response('homework/index.html', {'username': u, 'is_teacher': is_teacher})        else:                is_student = True                return render_to_response('homework/index.html', {'username': u, 'is_student': is_student})