Now it sorts articles correctly on update.
This commit is contained in:
parent
6e0226028d
commit
78d2ccdbc6
|
@ -182,10 +182,10 @@ def join_articles():
|
|||
# Bring articles into chronological order
|
||||
t = time.mktime(time.strptime(article['DATE'] + " " + article['TIME'],"%m/%d/%y %H:%M:%S"))
|
||||
articles_dict[str(t)] = article
|
||||
dates_of_creation = [value for value in articles_dict.keys()]
|
||||
print(dates_of_creation)
|
||||
dates_of_creation = [float(value) for value in articles_dict.keys()]
|
||||
dates_of_creation.sort(key=None,reverse=True)
|
||||
for date in dates_of_creation:
|
||||
joined_html += article_to_html(articles_dict[str(time.strftime(date))])
|
||||
joined_html += article_to_html(articles_dict[str(time.strftime(str(date)))])
|
||||
|
||||
return joined_html
|
||||
|
||||
|
|
Loading…
Reference in New Issue