What you are trying to do is a bit complicated and your code is very hard to
follow so it's difficult to help. One thing you might consider doing is
*radically* simplifying.
For starters, you are doing quite a number of non-standard things. For
example, "SQLField" is not really used any more. Instead use "Field". You
can use "request.now" for the current datatime. For "author", you would
usually use either a reference (Field('author', db.auth_user)) or
default=auth.user_id.
To put all of those objects together on one page you're going to have to
create a complicated queries and then come complicated code. Just to get
posts and comments, you might need to do something like:
{{for blogpost in blogposts:}}
{{= blogpost.text}}
{{for blogcomment in blogcomments:}}
{{if blogcomment.post==blogpost.id:}}
{{=blogcomment.comment}}
{{pass}}
{{pass}}
{{pass}}
There's probably a more efficient way to do it.