fixing posts ordering

home_site
The Git Man 2017-07-05 15:29:01 +02:00
parent 139f81791b
commit 2424a0f41e
2 changed files with 3 additions and 2 deletions

View File

@ -18,10 +18,10 @@ def pull_feed_entries():
entries = feedparser.parse(url).entries
for e in entries:
e.tag = tag
dt = datetime.fromtimestamp(mktime(e.updated_parsed))
dt = datetime.fromtimestamp(mktime(e.published_parsed))
e.updated_display = dt.strftime(app.config['DATE_FORMAT'])
all_entries.extend(entries)
all_entries.sort(key=lambda e: e.updated_parsed, reverse=True)
all_entries.sort(key=lambda e: e.published_parsed, reverse=True)
return all_entries[:app.config['MAX_ENTRIES']]
def mailman_subscribe(email, mailing_list):

View File

@ -16,6 +16,7 @@
{% endblock %}
{% block basic_style %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="google-site-verification" content="trUiKRnUNhystQjYg-j5j_0qEn09Wijd94aYhv3RyB8" />
<link rel="shortcut icon" href="https://static.hackerspace.pl/img/favicon.ico"/>
<link rel="apple-touch-icon" href="https://static.hackerspace.pl/img/glider.png"/>