def home(request): c = get_common_context(request) c['request_url'] = 'home' c['partners'] = Partner.get_list(c['lang']) c['home_content'] = Page.get('home', c['lang'])['content'] c['home_about'] = Page.get('home_about', c['lang'])['content'] c['home_projects'] = Page.get('home_projects', c['lang'])['content'] c['home_probation'] = Page.get('home_probation', c['lang'])['content'] if request.user.is_authenticated(): if not (request.user.first_name or request.user.last_name): c['msg'] = u'Необходимо заполнить поля: Имя и Фамилия.' return HttpResponseRedirect('/profile/') return render_to_response('home.html', c, context_instance=RequestContext(request))
def partners(request): c = get_common_context(request) c['list'] = Partner.get_list(c['lang']) return render_to_response('partners.html', c, context_instance=RequestContext(request))