文件夹中文件夹层数太多
发表者: admin 2周,3天前 (Posted by: admin 2 weeks, 3 days ago)
(Comments)
( 评论 )
Mezzanine is a powerful, consistent, and flexible content management platform. Built using the Django framework, Mezzanine provides a simple yet highly extensible architecture that encourages diving in and hacking on the code.
夹层是一个功能强大,一致且灵活的内容管理平台。 Mezzanine 使用 Django 框架构建,提供了一个简单但高度可扩展的体系结构,鼓励深入研究和破解代码。
To display the recent post in home page, Just copy and paste the below code in templates/index.html
要在首页中显示最新帖子,只需将以下代码复制并粘贴到templates/index.html
<div><div>
{% blog_recent_posts 5 as recent_posts %}
{% blog_recent_posts 5 as recent_posts %}
{% if recent_posts %}
{% if recent_posts %}
<h3>{% trans "Recent Posts" %}<h3> {% trans "Recent Posts" %}
<a <a class=class= "text-capitalize" "text-capitalize" href=href= "{{ recent_post.get_absolute_url }}""{{ recent_post.get_absolute_url }}"
<small <small style=style= "padding-left:10px;" padding-left:10px; ""
<div <div class=class= "recent-summary""recent-summary"
{% endif %}
{% endif %}
</div></div> <!-- Recent Posts -->
<!-- Recent Posts -->
This displays only 5 recent posts, you can change the value in this code.
这仅显示5条最近的帖子,您可以在此代码中更改值。
翻译自: https://www.pybloggers.com/2016/01/mezzanine-adding-recent-post-in-home-page/
文件夹中文件夹层数太多