码迷,mamicode.com
首页 > 其他好文 > 详细

关于模板

时间:2019-09-24 13:49:58      阅读:77      评论:0      收藏:0      [点我收藏+]

标签:sage   text   options   不用   process   debug   关于   temp   mes   

添加静态文件全局配置,不用在模板里插入load

 1 TEMPLATES = [
 2     {
 3         ‘BACKEND‘: ‘django.template.backends.django.DjangoTemplates‘,
 4         ‘DIRS‘: [os.path.join(BASE_DIR, ‘templates‘)]
 5         ,
 6         ‘APP_DIRS‘: True,
 7         ‘OPTIONS‘: {
 8             ‘context_processors‘: [
 9                 ‘django.template.context_processors.debug‘,
10                 ‘django.template.context_processors.request‘,
11                 ‘django.contrib.auth.context_processors.auth‘,
12                 ‘django.contrib.messages.context_processors.messages‘,
13             ],
14             ‘builtins‘:
15                 [‘django.templatetags.static‘]
16         },
17     },
18 ]

 

关于模板

标签:sage   text   options   不用   process   debug   关于   temp   mes   

原文地址:https://www.cnblogs.com/jssoft/p/11577783.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!