使用最新的twitter 1.1api,为django cms支持的站点显示tweets的最简单方法。在没有第三方小部件的情况下,在你的网站上嵌入tweets是一个很好的选择。
djangocms-twitter2的Python项目详细描述
使用djangocms-twitter2为来自单个用户、用户收藏夹或任何搜索查询或标签的推文嵌入时间线。
此项目需要django-connected和django-cmsv3.0或更高版本才能正确安装和配置。使用pip安装djangocms-twitter2时,也将自动安装django-connected。
预览
请单击缩略图以获取更大的图像。
快速启动
安装djangocms-twitter2:
pip install djangocms-twitter2
将djangocms_twitter添加到INSTALLED_APPS:
INSTALLED_APPS = ( ... 'connected_accounts', 'connected_accounts.providers', 'djangocms_twitter', ... )
要启用Twitter作为django-connected的提供商,您可以通过https://apps.twitter.com/app/new:
CONNECTED_ACCOUNTS_TWITTER_CONSUMER_KEY = '<twitter_consumer_key>' CONNECTED_ACCOUNTS_TWITTER_CONSUMER_SECRET = '<twitter_consumer_secret>'
同步数据库(如果使用的是django 1.6.x,则需要south>=1.0.1):
python manage.py migrate
配置
plugin(s)module-如果module为none,则plugin被分组为generic group:
DJANGOCMS_TWITTER_PLUGIN_MODULE = _('Generic')
插件名称:
DJANGOCMS_TWITTER_PLUGIN_NAME = _('Twitter')
此插件只能附加到附加到页面的占位符:
DJANGOCMS_TWITTER_PAGE_ONLY = False
插件类名的列表。如果设置了此选项,则只能将此插件添加到此处列出的插件中:
DJANGOCMS_TWITTER_PARENT_CLASSES = None
是否要求此插件是另一个插件的子插件?或者可以添加到任何占位符:
DJANGOCMS_TWITTER_REQUIRE_PARENT = False
此插件是否可用于文本插件:
DJANGOCMS_TWITTER_TEXT_ENABLED = False
用于呈现模板的默认模板的路径:
DJANGOCMS_TWITTER_DEFAULT_TEMPLATE = 'djangocms_twitter/default.html'
或者覆盖Design下拉选项以具有不同的设计选项:
DJANGOCMS_TWITTER_TEMPLATES = ( ('djangocms_twitter/default.html', _('Default')), )
您也可以喜欢…
- Djangocms研究-https://github.com/mishbahr/djangocms-disqus
- djangocms fbcomments-https://github.com/mishbahr/djangocms-fbcomments
- djangocms表单-https://github.com/mishbahr/djangocms-forms
- djangocms gmaps-https://github.com/mishbahr/djangocms-gmaps
- djangocms instagram-https://github.com/mishbahr/djangocms-instagram
- djangocms响应包装-https://github.com/mishbahr/djangocms-responsive-wrapper
- djangocms youtube-https://github.com/mishbahr/djangocms-youtube