升华文本2编辑器样式滚动条。
django-sublime-scroll的Python项目详细描述
=======
django sublime scroll
====
“sublime text 2”样式的滚动条。
安装:
====
*pip安装django sublime scroll
*设置wkhtmltoimage
*加载模板标记
。代码::jinja
{%load sublime_scroll_tags%}
{%sublime_scroll%}
*最好有一些缓存,这样每次加载页面时都不会生成页面捕获。所以至少,你应该这样做:
…代码::jinja
{%load sublime_scroll_tags cache%}
{%cache 500 sublime_scroll%}
{%sublime_scroll%}
{%endcache%}
*确保响应中包含requestcontext。示例:
…代码::python
from django.template import request context
return render_to_response('index.html',{'form':form,},
context_instance=requestcontext(request))
代码::python
如果不在系统路径中,则指向wkhtmltoimage的绝对路径:
sublime_scroll_wkhtmltoimage_path(默认值:“wkhtmltoimage”)
滚动条宽度:
sublime_scroll设置
默认值(在javascript中):
{
“滚动条宽度”:150,
“偏移量”:0,
“Z索引”:50,
“内容宽度”:960,
“完整高度”:“$('html').height()”,
“不透明度”:0.1,
“颜色”:白色,
}
django sublime scroll
====
“sublime text 2”样式的滚动条。
安装:
====
*pip安装django sublime scroll
*设置wkhtmltoimage
*加载模板标记
。代码::jinja
{%load sublime_scroll_tags%}
{%sublime_scroll%}
*最好有一些缓存,这样每次加载页面时都不会生成页面捕获。所以至少,你应该这样做:
…代码::jinja
{%load sublime_scroll_tags cache%}
{%cache 500 sublime_scroll%}
{%sublime_scroll%}
{%endcache%}
*确保响应中包含requestcontext。示例:
…代码::python
from django.template import request context
return render_to_response('index.html',{'form':form,},
context_instance=requestcontext(request))
代码::python
如果不在系统路径中,则指向wkhtmltoimage的绝对路径:
sublime_scroll_wkhtmltoimage_path(默认值:“wkhtmltoimage”)
滚动条宽度:
sublime_scroll设置
默认值(在javascript中):
{
“滚动条宽度”:150,
“偏移量”:0,
“Z索引”:50,
“内容宽度”:960,
“完整高度”:“$('html').height()”,
“不透明度”:0.1,
“颜色”:白色,
}