<commit_before>from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse

from .models import Message


class LatestEntriesFeed(Feed):
    title = _("Social Latest Entries")
    link = "/feeds/"
    description = _("Latest entries from all the workgroups")

    def items(self):
        return Message.objects.order_by('-pubDate')[:10]

    def item_title(self, item):
        return '[{group}] {title}'.format(
            group=item.group,
            title=item.title,
        )

    def item_description(self, item):
        return item.content

    def item_link(self, item):
        return reverse('index')<commit_msg>UnicodeEncodeError on flux solved<commit_after>from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse

from .models import Message


class LatestEntriesFeed(Feed):
    title = _("Social Latest Entries")
    link = "/feeds/"
    description = _("Latest entries from all the workgroups")

    def items(self):
        return Message.objects.order_by('-pubDate')[:10]

    def item_title(self, item):
        return u'[{group}] {title}'.format(
            group=unicode(item.group),
            title=item.title,
        )

    def item_description(self, item):
        return item.content

    def item_link(self, item):
        return reverse('index')
{'fraction_non_alphanumeric': 0.10167310167310167, 'fraction_numerical': 0.002574002574002574, 'mean_word_length': 3.271978021978022, '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': '1823765', 'n_tokens_mistral': 457, 'n_tokens_neox': 439, 'n_words': 118}