|
пре 10 година | |
---|---|---|
.. | ||
README.md | пре 9 година | |
__init__.py | пре 9 година | |
always_modified.py | пре 9 година |
Say you want to sort by modified date/time in a theme template, but not all your articles have modified date/timestamps explicitly defined in article metadata. This plugin facilitates that sorting by assuming the modified date (if undefined) is equal to the created date.
Now you can sort by modified date in your templates:
{% for article in articles|sort(reverse=True,attribute='modified') %}