English 中文(简体)
如何在集延戈的基模板中确定变量?
原标题:How to set variables in base template in django?

i 设有模板基.html和一些儿童模板。 我不知道如何为基数确定变量。 html

例如,如果(i)有{%(用户)%}{%的终端>? 家长们对所有观点都有看法?

最佳回答

如果你希望在所有模板中提供某些变量,请在以下网址上填写:template context processor(

问题回答

你们不会把变数分别分配给母体模板。 模板扩展了母体模板,而整体而言,变数只有一个背景。

我建议您重新阅读Django模板和继承方面的文档。





相关问题
Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

How to create a submit button template in Oracle APEX?

I m trying to create a template for a button in Oracle APEX but I don t seem to have access to the appropriate substitution strings to make it work. For non-templated buttons APEX seems to insert a ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Load ruby on rails template from database

I wonder if there is a way for me to store ruby on rails view files into database store and have that fetched directly from there. The reason is I want to create a CMS with all the user data stored in ...

Templated HTML Editor

I m looking for a HTML editor that kinda supports templated editing or live snippets or something like that. Background: I m working on a website for a friend. As there are no specifications what the ...

Dreamweaver changing path to site s reference instead of local

I have noticed recently, when I apply a template to a new HTML website, all the relative paths are pointed to my local files, example: file:///C|/webstuff/files but I cannot set them to relative paths ...

WPF ListView : Header styling

I want to have a ListView with columns and a particular style: The background for ALL column headers should be transparent except when the mouse is over in one of them. When this happends, the ...

热门标签