def display_user (request, user_name): user = user_auth(request) user_profile = get_object_or_404(UserProfile, username=user_name) return display_revision(revision = user_profile.wiki_page.last_revision(), user = user, widgets = { 'is_user' : True, 'user' : user_profile, }, context_instance = RequestContext(request), )
def display_contest (request, contest_code): user = user_auth (request) contest = get_object_or_404 (Contest, code = contest_code) return display_revision(revision = contest.wiki_page.last_revision(), user = user, widgets = { 'is_contest' : True, 'contest' : contest, }, context_instance = RequestContext(request), )
def display_user(request, user_name): user = user_auth(request) user_profile = get_object_or_404(UserProfile, username=user_name) return display_revision( revision=user_profile.wiki_page.last_revision(), user=user, widgets={ 'is_user': True, 'user': user_profile, }, context_instance=RequestContext(request), )
def display_contest(request, contest_code): user = user_auth(request) contest = get_object_or_404(Contest, code=contest_code) return display_revision( revision=contest.wiki_page.last_revision(), user=user, widgets={ 'is_contest': True, 'contest': contest, }, context_instance=RequestContext(request), )
def display_problem (request, problem_code): user = user_auth (request) problem = get_object_or_404 (Problem, code = problem_code) return display_revision(revision = problem.wiki_page.last_revision(), user = user, widgets = { 'is_problem' : True, 'problem' : problem, 'submit_form' : JobSubmitForm(), 'compilers' : config.judge.COMPILERS, }, context_instance = RequestContext(request), )
def display_problem(request, problem_code): user = user_auth(request) problem = get_object_or_404(Problem, code=problem_code) return display_revision( revision=problem.wiki_page.last_revision(), user=user, widgets={ 'is_problem': True, 'problem': problem, 'submit_form': JobSubmitForm(), 'compilers': config.judge.COMPILERS, }, context_instance=RequestContext(request), )