我有一个博客索引页面,上面有博客文章和摘录列表。一旦我点击“阅读更多”的链接,完整的博客文章将被打开,但没有标题和创建日期。
博客索引的结构如下:
{% for post in paginator.posts %}
<div class="entry">
<h1>{{ post.title }}</h1>
<span class="date"><i class="fa fa-clock-o"></i> {{ post
我正在用express构建一个大型博客应用程序,我的问题是大型博客和大型应用程序如何构建它们的文件。
对于我的应用程序,我正在为我写的每一篇博客文章创建一个新的ejs文件。我这么做是因为我写的每一篇博客文章都有不同数量的图片,不同的标题等等。然而,我意识到有很多文件正在积累。
Is there a better way of doing this?
我想将文章内容存储在数据库中,但由于每一篇文章的内容不同,我不认为这是可行的。
像这样的东西
let articleText = query db for article text;
res.render("article.ejs"
我有一个django 1.4.6项目。我试图在我的模板中显示将来没有日期的博客条目,所以我在我的models.py页面中拼凑了这段代码,它的工作原理是:
#if the blog is post/future dated, do not display the blog entry.
@property
def is_past_date_published_blog(self):
if self.blog_post_date_published < date.today():
return True
retu