I try show post only from 30 days. What I do worng?
@login_required
def dashboard(request):
days = 30
posts = Post.objects.filter(Post.publish < timezone.now() - timedelta(days=days))
#posts = Post.objects.all()
return render(request, 'account/dashboard.html', {'section': 'dashboard', 'posts': posts})
error
TypeError at /account/
unorderable types: DeferredAttribute() < datetime.datetime()