So Im calling a flask function which takes one parameter check from my html code, im getting the error: TypeError: categories_html() missing 1 required positional argument: 'check'.
Heres my Python code:
app.route('/cat_html', methods=['GET'])
def categories_html(check):
if session.get('teacher_name'):
return trav0.gen(check)
else:
return redirect('/teachers')
And then here is the html call:
<li class="nav-item">
<a class="navbar-brand" href="{{ url_for('categories_html', check='sta10') }}" target="_blank" style="color:31708f;">Tasks</a>
</li>
So trav0.gen generates a html, check is simply equal to a number, depending on the number a different html is generated.