<commit_before>from rest_framework import serializers

from apps.article.models import Article, Tag
from apps.authentication.serializers import UserSerializer


class ArticleSerializer(serializers.ModelSerializer):
    author = UserSerializer(source='created_by')  # serializers.StringRelatedField(source='created_by')
    absolute_url = serializers.CharField(source='get_absolute_url', read_only=True)

    class Meta:
        model = Article
        fields = (
                'absolute_url', 'additional_authors', 'author', 'changed_date', 'content', 'created_date',
                'featured', 'heading', 'id',
                # 'image_article_front_featured', 'image_article_front_small', 'image_article_full', 'image_article_main', 'image_article_related',<commit_msg>Clean up article serializer a bit<commit_after>from rest_framework import serializers

from apps.article.models import Article, Tag
from apps.authentication.serializers import UserSerializer


class ArticleSerializer(serializers.ModelSerializer):
    author = UserSerializer(source='created_by')
    absolute_url = serializers.CharField(source='get_absolute_url', read_only=True)

    class Meta:
        model = Article
        fields = (
                'absolute_url', 'additional_authors', 'author', 'changed_date', 'content', 'created_date',
                'featured', 'heading', 'id',
{'fraction_non_alphanumeric': 0.10183150183150183, 'fraction_numerical': 0.0, 'mean_word_length': 4.508064516129032, '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': '4091963', 'n_tokens_mistral': 369, 'n_tokens_neox': 354, 'n_words': 78}