Skip to content

Commit a50b2af

Browse files
author
Aaron Dorheim-Davis
committed
Part XIII: Dates and Times
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xiii-dates-and-times based on moment.js. Need to look into that more, but I don't like the code he uses, so I'm leaving most of the content of this step out.
1 parent 87c2d7b commit a50b2af

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

microblog/app/static/js/moment.min.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

microblog/app/templates/base.html

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{% endif %}
99

1010
<link href="/static/css/normalize.css" rel="stylesheet">
11+
<script src="/static/js/moment.min.js"></script>
1112

1213
{% block additional_head %}{% endblock %}
1314
</head>

microblog/app/templates/post.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<div>
22
<img src="{{post.author.avatar(50)}}">
33
<em>{{post.author.nickname}} says: </em>
4+
<time datetime="{{post.timestamp}}">{{post.timestamp}}</time>
45
<p>{{post.body}}</p>
56
<div>

0 commit comments

Comments
 (0)