文件夹中文件夹层数太多_夹层:在首页中添加最新帖子

文件夹中文件夹层数太多

(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条最近的帖子,您可以在此代码中更改值。

Current rating: 4
当前评分:4

翻译自: https://www.pybloggers.com/2016/01/mezzanine-adding-recent-post-in-home-page/

文件夹中文件夹层数太多

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值