一个可重用的django应用程序,用于管理不同语言的新闻/博客条目。
django-multilingual-news的Python项目详细描述
主页:https://github.com/bitmazk/django多语言新闻以不同语言管理新闻/博客条目。
django cms apphook附带了一个应用程序,并已使用django 1.5.1和
django cms 2.4.1编写。从2.0版开始,它在django 1.9和django cms 3上得到了进一步的测试和开发。
包括
-基于"django人"的条目作者<;http://github.com/bitmazk/django people/>;`"人"
-基于"django文档库"的条目附件<;http://github.com/bitmazk/django文档库>;`文档
-通过"django多语言标记"进行标记<;http://github.com/bitmazk/django多语言标记>;``使用基于标记的存档视图
-条目类别
-所有新闻条目的RSS源,仅限特殊作者或基于标记的。
-站点地图
-条目上的seo字段,用于存储自定义的单个元描述和
标题。
installation
----
如果要从pypi安装最新的稳定版本:$pip install django multilingual news
如果您喜欢冒险并希望安装来自github的最新commit::
$pip install-e git://github.com/bitmazk/django multilingual news.git egg=multilingual新闻
add``多语言新闻``到您的``已安装的`应用``:
"文档库",
"CMS相关要求"(请检查相关的"文档"<;https://github.com/divio/django cms>;`)
"CMS"、
"菜单"、
"treebeard",
与文件管理器相关的要求(请查看相关的"文档"<;https://github.com/divio/django filer>;`)
"文件管理器"
"简单的缩略图"
)
./manage.py migrate
----
占位符("摘录"和"内容")
++++++++++++++++++++++++++++++++++++++您可以使用两个CMS占位符。该摘录仅在列表视图中使用。向占位符添加内容的工作方式与向CMS页面添加内容的工作方式几乎相同。首先,创建一个新闻条目,然后转到其详细视图。使用django cms工具栏向占位符添加插件。有关详细信息,请访问"django cms"文档<;http://docs.django cms.org/en/latest/introduction/templates\u placeholders.html\placeholders>;`.
++++++++
要添加博客的站点地图,请将以下内容添加到urlconf::
来自多语言新闻。站点地图导入新闻站点地图
url patterns+=模式(
'',
url(r'^sitemap.xml$','django.contrib.sitemaps.views.sitemap',{
'站点地图':{
'博客条目':新闻站点地图,
},}),
)
rss feeds
++++++所有新闻`{%url"news_rss"%}`
2。特定作者的新闻`{%url"news\rss\u author"author=author.pk%}`,
,其中``author`是``people.person`
3的实例。所有新闻`{%url"news_rss_taged"tag=tag.slug%}```,其中`` tag``是``多语言` tags.tag``的一个
taging
++++
它在底部呈现内联表单。
多语言新闻标签%}
{%get_recent_news limit=5 as recent_news%}
{%include"multilingual_news/recent.html"with object_list=recent_news%}
只要添加相关的
category slug::
{%get_recent_news category='category-slug'作为recent_news%}
您可能希望从queryset中排除当前新闻:
{%get_recent_news exclude=object as recent_news%}
get_news entry_meta_description和get_news entry_meta_title
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
要呈现来自seo字段的最佳匹配标题或描述,可以使用模板标记"get_newsrentry_meta_description"和"get_newsrentry_meta_title"。用法:
<;title>;{%get懔newsrentry懔meta懔title entry懔instance%}<;title>;
<;meta name="description"content={%get懔newsrentry懔meta懔description entry懔instance%}/>;
----
与bootstrap兼容的功能列表:
*删除新闻条目的删除确认模式。
bootstrap 3功能,需要将bootstrap js库添加到模板中。如果你还没有……代码块::html
<;script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js">;
delete confirmation model
+++++++++++++
将以下标记添加到模板中。
…代码块:html
{%load static%}
{{div id="ajax modal"class="modal fade"tabindex="-1">;
<;div class="modal content">;
<;div class="modal header">;
<;button type="button"class="close"data dismission="modal"aria hidden="true">;<;次;/按钮>;
<;div>;
<;div class="modal body">;
<;div>;
<;div>;
<;div>;
代码块::html
<;a href="{%url"news\u delete"pk=news\u entry.pk%}"data class="toggledeletemodel">;删除<;/a>;
参与
----
如果您想参与此项目,请执行以下步骤
…代码块::bash
fork这个存储库
clone your fork
mkvirtualenv-p python2.7 django多语言新闻
make develop
功能和测试
git add。&;git commit
git push-u origin feature\u branch
向我们发送功能分支的拉取请求
要运行测试,只需执行"tox"。这将安装两个新的
环境(适用于django 1.8和django 1.9),并对这两个
环境运行测试。
关键字:django、news、blog、多语言、cms
平台:操作系统无关
django cms apphook附带了一个应用程序,并已使用django 1.5.1和
django cms 2.4.1编写。从2.0版开始,它在django 1.9和django cms 3上得到了进一步的测试和开发。
包括
-基于"django人"的条目作者<;http://github.com/bitmazk/django people/>;`"人"
-基于"django文档库"的条目附件<;http://github.com/bitmazk/django文档库>;`文档
-通过"django多语言标记"进行标记<;http://github.com/bitmazk/django多语言标记>;``使用基于标记的存档视图
-条目类别
-所有新闻条目的RSS源,仅限特殊作者或基于标记的。
-站点地图
-条目上的seo字段,用于存储自定义的单个元描述和
标题。
installation
----
如果要从pypi安装最新的稳定版本:$pip install django multilingual news
如果您喜欢冒险并希望安装来自github的最新commit::
$pip install-e git://github.com/bitmazk/django multilingual news.git egg=multilingual新闻
add``多语言新闻``到您的``已安装的`应用``:
"文档库",
"CMS相关要求"(请检查相关的"文档"<;https://github.com/divio/django cms>;`)
"CMS"、
"菜单"、
"treebeard",
与文件管理器相关的要求(请查看相关的"文档"<;https://github.com/divio/django filer>;`)
"文件管理器"
"简单的缩略图"
)
./manage.py migrate
----
占位符("摘录"和"内容")
++++++++++++++++++++++++++++++++++++++您可以使用两个CMS占位符。该摘录仅在列表视图中使用。向占位符添加内容的工作方式与向CMS页面添加内容的工作方式几乎相同。首先,创建一个新闻条目,然后转到其详细视图。使用django cms工具栏向占位符添加插件。有关详细信息,请访问"django cms"文档<;http://docs.django cms.org/en/latest/introduction/templates\u placeholders.html\placeholders>;`.
++++++++
要添加博客的站点地图,请将以下内容添加到urlconf::
来自多语言新闻。站点地图导入新闻站点地图
url patterns+=模式(
'',
url(r'^sitemap.xml$','django.contrib.sitemaps.views.sitemap',{
'站点地图':{
'博客条目':新闻站点地图,
},}),
)
rss feeds
++++++所有新闻`{%url"news_rss"%}`
2。特定作者的新闻`{%url"news\rss\u author"author=author.pk%}`,
,其中``author`是``people.person`
3的实例。所有新闻`{%url"news_rss_taged"tag=tag.slug%}```,其中`` tag``是``多语言` tags.tag``的一个
taging
++++
它在底部呈现内联表单。
多语言新闻标签%}
{%get_recent_news limit=5 as recent_news%}
{%include"multilingual_news/recent.html"with object_list=recent_news%}
只要添加相关的
category slug::
{%get_recent_news category='category-slug'作为recent_news%}
您可能希望从queryset中排除当前新闻:
{%get_recent_news exclude=object as recent_news%}
get_news entry_meta_description和get_news entry_meta_title
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
要呈现来自seo字段的最佳匹配标题或描述,可以使用模板标记"get_newsrentry_meta_description"和"get_newsrentry_meta_title"。用法:
<;title>;{%get懔newsrentry懔meta懔title entry懔instance%}<;title>;
<;meta name="description"content={%get懔newsrentry懔meta懔description entry懔instance%}/>;
与bootstrap兼容的功能列表:
*删除新闻条目的删除确认模式。
bootstrap 3功能,需要将bootstrap js库添加到模板中。如果你还没有……代码块::html
<;script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js">;
delete confirmation model
+++++++++++++
将以下标记添加到模板中。
…代码块:html
{%load static%}
{{div id="ajax modal"class="modal fade"tabindex="-1">;
<;div class="modal content">;
<;div class="modal header">;
<;button type="button"class="close"data dismission="modal"aria hidden="true">;<;次;/按钮>;
<;div>;
<;div class="modal body">;
<;div>;
<;div>;
<;div>;
代码块::html
<;a href="{%url"news\u delete"pk=news\u entry.pk%}"data class="toggledeletemodel">;删除<;/a>;
参与
----
如果您想参与此项目,请执行以下步骤
…代码块::bash
fork这个存储库
clone your fork
mkvirtualenv-p python2.7 django多语言新闻
make develop
git add。&;git commit
git push-u origin feature\u branch
向我们发送功能分支的拉取请求
要运行测试,只需执行"tox"。这将安装两个新的
环境(适用于django 1.8和django 1.9),并对这两个
环境运行测试。
关键字:django、news、blog、多语言、cms
平台:操作系统无关