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(): @@ -51,11 +51,8 @@ def register():
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
def project_dashboard(project_name):
print(project_name)
project = Project.get(name=project_name)
if project is None:
abort(404)
def project_dashboard(project_url):
project = Project.first_or_404(url=project_url)
return render_template('project.html', project=project)

Loading…
Cancel
Save