Browse Source

Use url variable instead of name

master
Burathar 4 years ago
parent
commit
0b1b20f11e
  1. 9
      biscd/biscd/routes.py

9
biscd/biscd/routes.py

@ -51,11 +51,8 @@ def register():
return render_template('register.html', title='Register', form=form) return render_template('register.html', title='Register', form=form)
@app.route('/project/<project_name>', methods=['GET', 'POST']) @app.route('/project/<project_url>', methods=['GET', 'POST'])
@login_required @login_required
def project_dashboard(project_name): def project_dashboard(project_url):
print(project_name) project = Project.first_or_404(url=project_url)
project = Project.get(name=project_name)
if project is None:
abort(404)
return render_template('project.html', project=project) return render_template('project.html', project=project)

Loading…
Cancel
Save