我正在创建一个板球网站,它使用Django显示板球比赛的直播分数。,我希望我的模板在超时后动态更新其内容( id='main- content '),我不知道如何实现它。
这是我的代码:
views.py
def livescores():
# generates livescores and returns a dict containing live scores
return scores
def display_scores(request):
# calls the livescores function and gets the dict