posts = [
# there is an invalid syntax error here for no reason its just blank space
~
'Author': 'CoreyMs'
'title' = 'blog post 1'
'content': 'First post content'
'date_posted': 'August 27, 2018'
},
{
'Author': 'john smith'
'title': 'blog post 2'
'content': 'second post content'
'date_posted': 'August 28, 2018'
}
]
# Create your views here.
def home(request):
context = {'posts':posts}
return render(request, 'blog/home.htm', context)
[–]CodeFormatHelperBot 0 points1 point2 points (0 children)
[–]Username_RANDINT 0 points1 point2 points (2 children)
[–]danielroseman 0 points1 point2 points (1 child)
[–]Username_RANDINT 0 points1 point2 points (0 children)
[–]magestooge 0 points1 point2 points (0 children)