def home(request): """Renders the home page.""" assert isinstance(request, HttpRequest) return render( request, 'app/index.html', context_instance = RequestContext(request, { 'host_info':BasicData.HOST, 'projectForm':ProjectData.getRecentThreeProjects(), 'year':datetime.now().year, }) )
def project(request): '''Rends Project Page''' assert isinstance(request, HttpRequest) value=request.GET.get("value") key=request.GET.get("key") if value==None: projectForm=ProjectData.getAllProjects curr_selection='All' else: projectForm=ProjectData.getProjectsByAttr(key,value) curr_selection=value return render( request, 'app/projects.html', context_instance = RequestContext(request, { 'host_info':BasicData.HOST, 'year':datetime.now().year, 'projectForm':projectForm, 'yearList':ProjectData.getValueListByAttr('year'), 'categoryList':ProjectData.getValueListByAttr('category'), 'curr_selection':curr_selection, }) )