mdfaisalamin 0 Newbie Poster

I have a database with some entry. In my web application I log in with a page and show the corrosponding entries for that user on another page. I am using Jinja werkzueg for my light weight example. And using SQL alchemy.

Here is my code for showing the password list on the app.py file.

class Passwordlist(flask.views.MethodView):
    @login_required
    def get(self):
           return flask.render_template('Password_list.html')

    @login_required
    def post(self):

       return flask.redirect(flask.url_for('listpassword'))

Then in my show page I want to list the details for that user. The data base connectivity is already tested with the following code.

 myuser =  "admin"
    mainuser = User.query.filter_by(username=myuser).first()
    assert mainuser is not None
    for w in Website.query.filter_by(user=mainuser):
        print "{0}: '{1}' '{2}'".format(w.id, w.urlusername, w.note)

This code works on my terminal run.

I need some idea how to implement it on the html page. I need the coding idea for the html page and for the
class Passwordlist(flask.views.MethodView):
part.

Thank you.