向您的响应添加品牌标题
django_branding的Python项目详细描述
django品牌化
>
>添加品牌化头到响应。
===
=======
>使用pip安装django品牌化
==
<
从品牌中添加品牌中间件django config
中间件类+=“branding.middleware.brandingmiddleware”,
>在设置中定义头变量
branding={
'x-programming':'lispython',
'x-revision':'232134'
}
[1]中http://dzone.me
上的头:将human_curl作为hurl导入[2]:r=hurl.get('http://dzone.me')
in[3]:r.headers
out[3]:
{cache-control':'max age=600',
'connection':'keep alive',
'content language':'ru',
'content length':'55239',
“内容类型”:“文本/html;字符集=utf-8”,
“日期”:“太阳,2012年4月29日12:51:12 GMT”,
“过期时间”:“太阳,2012年4月29日13:01:12 GMT”,
“上次修改时间”:“太阳,2012年4月29日12:51:12 GMT”,
“链接”:“<;dzone.me>;;rel=”平台“,
“服务器”:“超级服务器”,
“更改”:“接受语言,cookie,接受编码',
'x-powered-by':'d zone',
'x-programming':'alex lispython(alex@dzone.me,github.com/lispython)',
'x-revision':'5215de3',
'x-version':'20120311.0013-0'}
>
>添加品牌化头到响应。
===
=======
>使用pip安装django品牌化
==
<
从品牌中添加品牌中间件django config
中间件类+=“branding.middleware.brandingmiddleware”,
>在设置中定义头变量
branding={
'x-programming':'lispython',
'x-revision':'232134'
}
[1]中http://dzone.me
上的头:将human_curl作为hurl导入[2]:r=hurl.get('http://dzone.me')
in[3]:r.headers
out[3]:
{cache-control':'max age=600',
'connection':'keep alive',
'content language':'ru',
'content length':'55239',
“内容类型”:“文本/html;字符集=utf-8”,
“日期”:“太阳,2012年4月29日12:51:12 GMT”,
“过期时间”:“太阳,2012年4月29日13:01:12 GMT”,
“上次修改时间”:“太阳,2012年4月29日12:51:12 GMT”,
“链接”:“<;dzone.me>;;rel=”平台“,
“服务器”:“超级服务器”,
“更改”:“接受语言,cookie,接受编码',
'x-powered-by':'d zone',
'x-programming':'alex lispython(alex@dzone.me,github.com/lispython)',
'x-revision':'5215de3',
'x-version':'20120311.0013-0'}