在你的网站上的每一页上标记一个指示文字或图像

django-site-tag的Python项目详细描述


Django站点标记

django site tag允许您在网站的每个页面上设置“tags”,以指示当前环境、developemnt阶段或您可能希望使用此类功能的任何其他内容。

Demo Image

安装

pip install git+https://github.com/yudori/django-site-tag.git

设置

安装后,将django_site_tag应用程序名称添加到已安装的应用程序列表中。

INSTALLED_APPS=[...# django apps'django_site_tag',...# custom apps]

将站点标记中间件添加到中间件列表中。

MIDDLEWARE=[...# django middleware list'django_site_tag.middleware.SiteTagMiddleware',...# custom middleware list]

定制

通过django设置提供自定义选项。设置以下任意值以将自定义设置添加到站点标记。

Setting NameTypeDescriptionExample Value
^{}stringspace-separated css position values in the order: top, right, bottom ,left representing the position of the site tag'15px 0px 0px 15px'
^{}stringThe text to be written on the tag'TEST'
^{}stringThe css style to be applied to the text'padding: 10px;'
^{}stringThe css style to be applied to the border around the text'2px dashed #ff0000;'
^{}stringThe url to the image file to be used instead of text'/static/images/tag.jpg'

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
jframe为什么JAVA paint()方法不起作用?   java Guice:将ContainerRequestContext注入拦截器   java如何优雅地关闭Spring JMS MessageListenerAdapter   java如何在Spring中设置快照隔离级别   Java中的安卓平台独立信任存储路径   java无法在eclipse中运行hello world程序   java Sinch空指针问题   使用Java将JSON流式传输到BigQuery   java从“大数据”中选择什么Swing控件?   java通过对象字段过滤/排序集合?   java将数据从活动传递到另一个活动中的片段   java访问打包在jar文件中的文档   Java获取事件的大小。getDragboard()。getFiles()。流()。映射(文件::长度)。toString());   java Android libgdx:启动程序图标按下后,启动屏幕不会立即显示   java如何在Google App Engine灵活环境中配置oracle jdk   java有没有办法减少这些行?   Java:客户端socket不读取第二行,在终止符行之后保持打开状态   java以编程方式获取api 29上的所有APK文件   java ActionBar按钮不显示