当我将一个简单的dict (myDict = {"key": "value"})传递给html时,它会产生一个错误,因为html无法读取dict的值。django.template.exceptions.TemplateSyntaxError: Could not parse the remainder: '['key']
我有一个充满天气对象的查询集,我需要遍历一个定制数组,在Django应用程序的HTML模板中提取每个天气对象中的特定天气指标。detail.html<tr> {% for variable in variable_list为什么我不能循环遍历变量列表并从weather_object中提取数据?具体而言,“weather_object.variable”就是不存在的。我可以手动完