Я построил вид домашней страницы Django, используя direct_to_template плюс множество extra_context, пример кода:
extra_context = {
'photo': Photo.objects.filter(section='example')[:5],
'video': Video.objects.filter(section='example')[:5],
'post': Post.objects.filter(section='example')[:5],
'page': Page.objects.get(slug='example'),
'artists': Artist.objects.all(),
}
url(r'^$', direct_to_template, {'template': 'homepage.html', 'extra_context': extra_context}, name='homepage')
Но контент на домашней странице всегда не самый новый, я должен перезапустить сервер dev или gunicorn, чтобы сделать егоDiaplay новейший контент.В чем проблема?