On every iteration you are overwriting the json_text
with
json_text = json.dumps(json_data)
You might want to concatenate the results like this
json_text += json.dumps(json_data)
As per the chat, your requirement is little different. So, something like this will work for you
for index, post in enumerate(posts, 1):
json_data["post{}".format(index)] = {
'subject': post.subject,
'content': post.blog,
'day' : post.day_created.strftime('%d %b %Y')
}
print {"allposts": json_data}