PyCharm grand repo wide reformat with black formatter

This commit is contained in:
Xevion
2020-03-08 20:49:06 -05:00
parent 66c2ff228c
commit bc3cd82a95
16 changed files with 487 additions and 341 deletions

View File

@@ -6,41 +6,43 @@ from app.custom import require_role
from app.forms import ProfileSettingsForm, ProfilePictureForm
@app.route('/dashboard')
@app.route("/dashboard")
@login_required
def dashboard():
return render_template('/dashboard/dashboard.html')
return render_template("/dashboard/dashboard.html")
@app.route('/dashboard/profile_settings', methods=['GET'])
@app.route("/dashboard/profile_settings", methods=["GET"])
@login_required
def profile_settings():
psform = ProfileSettingsForm()
ppform = ProfilePictureForm()
return render_template('/dashboard/profile_settings.html', psform=psform, ppform=ppform)
return render_template(
"/dashboard/profile_settings.html", psform=psform, ppform=ppform
)
@app.route('/dashboard/profile_settings/submit', methods=['POST'])
@app.route("/dashboard/profile_settings/submit", methods=["POST"])
@login_required
def profile_settings_submit():
form = ProfileSettingsForm()
if form.validate_on_submit():
data = {
'show_email': form.show_email.data or None,
'profile_picture_file': request.files
"show_email": form.show_email.data or None,
"profile_picture_file": request.files,
}
return jsonify(data=data)
return '{}'
return "{}"
@app.route('/dashboard/constants')
@app.route("/dashboard/constants")
@login_required
@require_role(roles=['Admin'])
@require_role(roles=["Admin"])
def constants():
return render_template('/dashboard/constants.html')
return render_template("/dashboard/constants.html")
@app.route('/dashboard/rbac')
@app.route("/dashboard/rbac")
@login_required
def rbac():
return render_template('/dashboard/rbac.html')
return render_template("/dashboard/rbac.html")