def projects_GETresponse(request, redirect, kw): visits_counter(request.path) projects_content = get_json(PROJECTS) template = get_content(PROJECTS_TEMPLATE) projects = "" for project in projects_content: projects += template.format( project_name=projects_content[project]["project_name"], project_id=project, project_date=projects_content[project]["project_date"], project_description=projects_content[project] ["project_description"], ) page_content = get_content(PROJECTS_INDEX).format(projects=projects) return HttpResponse(page_content, "text/html")
def get_editing_page(request, **kw): project_id = kw["project_id"] projects = get_json(PROJECTS) certain_project = projects[project_id] editing_page = get_content( PORTFOLIO / "test_projects" / "edit_projects.html").format(**certain_project, project_id=project_id) return HttpResponse(editing_page)
def get_projects_page(request): visits_counter(request.path) file_name = MY_PROJECTS_PAGE content = get_content(file_name) return HttpResponse(content)
def get_adding_page(request): adding_page = get_content(PORTFOLIO / "test_projects" / "add_projects.html") return HttpResponse(adding_page)
def get_portfolio(request): visits_counter(request.path) file_name = RESUME_INDEX content = get_content(file_name) return HttpResponse(content)