date = date['date_publish'].strftime('%Y%m文章存档')这个
strftime,是一种计算机函数,strftime() 函数根据区域设置格式化本地时间/日期,函数的功能将时间格式化,或者说格式化一个时间字符串。
进行数据迁移的时候用的,makemigrations,比较models与数据表当中的数据有哪些差异,然后生成迁移.py文件,这时候还没有进行数据库的迁移,然后再执行migrate操作就可以把models当中的数据表同步到数据库当中了,觉得这样做减少了对数据库的操作
placeholder
也就是html当中input当中的提示信息
<form action="demo-form.php">
<input type="text" name="fname" placeholder="First name"><br>
<input type="text" name="lname" placeholder="Last name"><br>
<input type="submit" value="Submit">
</form>