diff --git a/app/views.py b/app/views.py index a5596ed..64168b1 100644 --- a/app/views.py +++ b/app/views.py @@ -154,7 +154,7 @@ def http_page_not_found(e): return redirect(url_for('error', code=500)) -@app.route('/error/') +@app.route('/error/') def error(code, msg=None): supported_code = ('400', '401', '404', '500') if code in supported_code: @@ -472,7 +472,7 @@ def domain_add(): return render_template('domain_add.html') -@app.route('/admin/domain//delete', methods=['GET']) +@app.route('/admin/domain//delete', methods=['GET']) @login_required @admin_role_required def domain_delete(domain_name): @@ -488,7 +488,7 @@ def domain_delete(domain_name): return redirect(url_for('dashboard')) -@app.route('/admin/domain//manage', methods=['GET', 'POST']) +@app.route('/admin/domain//manage', methods=['GET', 'POST']) @login_required @admin_role_required def domain_management(domain_name): @@ -521,7 +521,7 @@ def domain_management(domain_name): return redirect(url_for('domain_management', domain_name=domain_name)) -@app.route('/domain//apply', methods=['POST'], strict_slashes=False) +@app.route('/domain//apply', methods=['POST'], strict_slashes=False) @login_required def record_apply(domain_name): """ @@ -544,7 +544,7 @@ def record_apply(domain_name): return make_response(jsonify( {'status': 'error', 'msg': 'Error when applying new changes'} ), 500) -@app.route('/domain//update', methods=['POST'], strict_slashes=False) +@app.route('/domain//update', methods=['POST'], strict_slashes=False) @login_required def record_update(domain_name): """ @@ -566,7 +566,7 @@ def record_update(domain_name): return make_response(jsonify( {'status': 'error', 'msg': 'Error when applying new changes'} ), 500) -@app.route('/domain//record//type//delete', methods=['GET']) +@app.route('/domain//record//type//delete', methods=['GET']) @login_required @admin_role_required def record_delete(domain_name, record_name, record_type): @@ -581,7 +581,7 @@ def record_delete(domain_name, record_name, record_type): return redirect(url_for('domain', domain_name=domain_name)) -@app.route('/domain//dnssec', methods=['GET']) +@app.route('/domain//dnssec', methods=['GET']) @login_required def domain_dnssec(domain_name): domain = Domain() @@ -589,7 +589,7 @@ def domain_dnssec(domain_name): return make_response(jsonify(dnssec), 200) -@app.route('/domain//managesetting', methods=['GET', 'POST']) +@app.route('/domain//managesetting', methods=['GET', 'POST']) @login_required @admin_role_required def admin_setdomainsetting(domain_name): @@ -755,7 +755,7 @@ def admin_settings(): return render_template('admin_settings.html', settings=settings) -@app.route('/admin/setting//toggle', methods=['POST']) +@app.route('/admin/setting//toggle', methods=['POST']) @login_required @admin_role_required def admin_settings_toggle(setting): @@ -766,7 +766,7 @@ def admin_settings_toggle(setting): return make_response(jsonify( { 'status': 'error', 'msg': 'Unable to toggle setting.' } ), 500) -@app.route('/admin/setting//edit', methods=['POST']) +@app.route('/admin/setting//edit', methods=['POST']) @login_required @admin_role_required def admin_settings_edit(setting): @@ -821,7 +821,7 @@ def user_profile(): return render_template('user_profile.html') -@app.route('/user/avatar/') +@app.route('/user/avatar/') def user_avatar(filename): return send_from_directory(os.path.join(app.config['UPLOAD_DIR'], 'avatar'), filename)