fixed error when 0 posts are loaded

This commit is contained in:
2020-05-18 15:41:55 +00:00
parent 31f5864267
commit 802a5085c2

View File

@@ -10,5 +10,7 @@ def index(request):
if l>=1:
featured_post=posts.popleft()
else:
featured_post=0
return render(request, 'home.html',{'posts':posts, 'featured_post':featured_post})