Retrieving data from appengine database and displaying it in a form
===

Im working on a CMS for appengine using python, I have a form page much like how wordpress works where you enter a Title, content and other meta data for the page. Lets say this is AddPage

Once the page is saved the data is stored and a link is shown on the article index page. Just like wordpress when you click on posts. What Im trying to do is once a link is clicked on the index page the user is redirected to a page which is exactly like the AddPage but it already has data filled in ready for editing.

How would I do this am I missing something:

    class EditPageHandler(webapp2.RequestHandler):
        def get(self, articleID):
            page_details = db.GqlQuery("SELECT * FROM TitlePage WHERE key_name = '" + articleID + "'" )
        pageDetails_list = page_details.fetch(10)
        template = jinja_environment.get_template('templates/editcourse.html')
        self.response.out.write(template.render({'page_details':pageDetails_list}))

the html template would display something like:

    <input id="author" type="text" name="author" maxlength="120" value="{{ page_details.Author }}">

Im not getting any errors and this does not work so something is not right here:

I have also tried outputting it like so:
    <input id="author" type="text" name="author" maxlength="120" value=" {% for details in page_details %}{{ details.Author }} {% endfor %}">

Still nothing any help please.