How to display elements in html according to the python flask database id?

Asked

Viewed 26 times

-1

This is my view in case you would like to know how to filter what will be shown in the next route for example in the group table has the id and in the table layer tbm according to your id in the next route will show what is related in the two

 @main.route('/dash', methods=['GET'])
 @login_required
 def dash():

 groups = Group.query.all()


 return render_template('dash.html' ,groups=groups)


 @main.route('/layers', methods=['GET'])
 @login_required
 def layers():
 layers =Layer.query.all()


 return render_template('layers.html',layers=layers )
  • Could format the code for a better look?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.