Commit 76ad54b4 authored by Julian Rother's avatar Julian Rother
Browse files

Reverted endpoint renaming

All instances of url_for (especially in the templates) have to be checked
when an enpoint is renamed! In this case all course links were broken.
parent 2a7dc3bf
......@@ -66,7 +66,7 @@ def index():
@app.route('/course')
@register_navbar('Videos', icon='film')
def course():
def videos():
courses = query('SELECT * FROM courses WHERE (? OR (visible AND listed))', ismod())
for course in courses:
if course['semester'] == '':
......@@ -77,7 +77,7 @@ def course():
return render_template('course.html', courses=courses, groupedby=groupedby)
@app.route('/course/<id>')
def course_id(id):
def course(id):
courses = query('SELECT * FROM courses WHERE ((handle = ?) or id = ?) AND (? OR visible)', id, id, ismod())
if not courses:
flash('Diese Veranstaltung existiert nicht!')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment