<commit_before># -*- coding: utf-8 -*-

from django.contrib.syndication.views import Feed, FeedDoesNotExist
from django.shortcuts import get_object_or_404
from Instanssi.ext_blog.models import BlogEntry
from Instanssi.kompomaatti.models import Event

class blog_feed(Feed):
    title = "Instanssi.org Blogi"
    link = "http://instanssi.org"
    description = "Instanssi-demopartyn uusimmat uutiset."

    def get_object(self, request, event_id):
        return get_object_or_404(Event, pk=event_id)

    def items(self, obj):
        entries = []
        for entry in BlogEntry.objects.filter(event=obj, public=True).order_by('-date')[:10]:
            entry.event_url = obj.mainurl
            entries.append(entry)
        return entries

    def item_title(self, item):<commit_msg>ext_blog: Sort by date, remove post limit.<commit_after># -*- coding: utf-8 -*-

from django.contrib.syndication.views import Feed, FeedDoesNotExist
from django.shortcuts import get_object_or_404
from Instanssi.ext_blog.models import BlogEntry
from Instanssi.kompomaatti.models import Event

class blog_feed(Feed):
    title = "Instanssi.org Blogi"
    link = "http://instanssi.org"
    description = "Instanssi-demopartyn uusimmat uutiset."

    def get_object(self, request, event_id):
        return get_object_or_404(Event, pk=event_id)

    def items(self, obj):
        entries = []
        for entry in BlogEntry.objects.filter(event=obj, public=True).order_by('date'):
            entry.event_url = obj.mainurl
            entries.append(entry)
        return entries

    def item_title(self, item):
{'fraction_non_alphanumeric': 0.10357815442561205, 'fraction_numerical': 0.010043942247332079, 'mean_word_length': 3.5155807365439093, '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': '2615032', 'n_tokens_mistral': 526, 'n_tokens_neox': 502, 'n_words': 115}