Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django模板中字符串变量内的变量值_Django_Django Templates - Fatal编程技术网

Django模板中字符串变量内的变量值

Django模板中字符串变量内的变量值,django,django-templates,Django,Django Templates,我已将文本另存为 text="Hey" + {{ student.name }} 我提供文本和学生到我的html模板页面。有没有一种方法可以让它显示学生的名字而不是字符串。你能提供更多细节吗?提供的代码行存在于何处?我将在模板中使用文本作为{{text}}。我认为您缺少包。。。

我已将文本另存为

text="Hey" + {{ student.name }}

我提供文本和学生到我的html模板页面。有没有一种方法可以让它显示学生的名字而不是字符串。

你能提供更多细节吗?提供的代码行存在于何处?我将在模板中使用文本作为{{text}}。我认为您缺少包。。。