<commit_before>from django import template

from ..models import Entry


register = template.Library()


@register.inclusion_tag('blog/entry_snippet.html')
def render_latest_blog_entries(num):
    entries = Entry.objects.published()[:num]
    return {
        'entries': entries,
    }


@register.inclusion_tag('blog/month_links_snippet.html')
def render_month_links():
    return {
        'dates': reversed(list(Entry.objects.published().dates('pub_date', 'month'))),
    }<commit_msg>Replaced reversed(list( with order parameter. Thanks @jezdez!<commit_after>from django import template

from ..models import Entry


register = template.Library()


@register.inclusion_tag('blog/entry_snippet.html')
def render_latest_blog_entries(num):
    entries = Entry.objects.published()[:num]
    return {
        'entries': entries,
    }


@register.inclusion_tag('blog/month_links_snippet.html')
def render_month_links():
    return {
        'dates': Entry.objects.published().dates('pub_date', 'month', order='DESC'),
    }
{'fraction_non_alphanumeric': 0.1360078277886497, 'fraction_numerical': 0.0, 'mean_word_length': 4.590163934426229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '488452', 'n_tokens_mistral': 317, 'n_tokens_neox': 305, 'n_words': 57}