print(req_json['ajax'])
if name:
    project = db.getProject(name)
form = ProjectForm(project)
if req_json['ajax']:
    return render_template('myform.html', form=form)
return render_template('projectView.html', form=form)
return render_template('projects.html')
Flask request.json to dict