fixing posts ordering
parent
139f81791b
commit
2424a0f41e
4
main.py
4
main.py
|
@ -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):
|
||||
|
|
|
@ -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"/>
|
||||
|
|
Reference in New Issue