# Path: attachments/serializers.py
# class MediaSerializer(serializers.HyperlinkedModelSerializer):
# class ImageSerializer(MediaSerializer):
#     class Meta:
# class VideoSerializer(MediaSerializer):
#     class Meta:
# class AudioSerializer(MediaSerializer):
#     class Meta:
# class ReviewSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class PollChoiceSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class PollSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
#     def get_is_courtesy(self, obj):
#     def get_resized(self, obj):
#     def get_art_request(self, obj):
# 
# Path: authors/serializers.py
# class OrganizationSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class PositionSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class JobSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class AuthorSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
#     def get_is_current(self, obj):
#     def __init__(self, *args, **kwargs):
# 
# Path: display/serializers.py
# class CardSizeSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class StylesheetSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class ScriptSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class TemplateSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# 
# Path: organization/serializers.py
# class SectionSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class TagSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class SiteSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# 
# Path: sports/serializers.py
# class SportSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class SchoolSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class GameSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:


import inspect
from rest_framework import serializers
from django.db.models.fields import Field
from django.contrib.contenttypes.models import ContentType
from attachments import serializers as attachments_serializers
from authors import serializers as authors_serializers
from display import serializers as display_serializers
from organization import serializers as organization_serializers
from sports import serializers as sports_serializers
from . import models
from . import utils
    is_published = serializers.SerializerMethodField()
    is_breaking = serializers.SerializerMethodField()

    class Meta:
        model = models.Story
        exclude = ('assignment_slug', 'status', 'summary', 'angle', 'sources',
                   'late_run', 'created')

    def __init__(self, *args, **kwargs):
        super(StorySerializer, self).__init__(*args, **kwargs)
        request = self.context.get('request')
        if request and request.user.is_authenticated():
            # sometimes a serializer is initialized without a request, so we
            # must check for its existence first
            self.fields['assignment_slug'] = serializers.CharField()
            self.fields['status'] = StatusSerializer()
            self.fields['summary'] = serializers.CharField()
            self.fields['angle'] = serializers.CharField()
            self.fields['sources'] = serializers.CharField()
            self.fields['late_run'] = serializers.BooleanField()
            self.fields['created'] = serializers.DateTimeField()

    def get_is_published(self, obj):
        return obj.is_published()

    def get_is_breaking(self, obj):
        return obj.is_breaking()


class PageSerializer(BodyTextSerializer):

# Path: attachments/serializers.py
# class MediaSerializer(serializers.HyperlinkedModelSerializer):
# class ImageSerializer(MediaSerializer):
#     class Meta:
# class VideoSerializer(MediaSerializer):
#     class Meta:
# class AudioSerializer(MediaSerializer):
#     class Meta:
# class ReviewSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class PollChoiceSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class PollSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
#     def get_is_courtesy(self, obj):
#     def get_resized(self, obj):
#     def get_art_request(self, obj):
# 
# Path: authors/serializers.py
# class OrganizationSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class PositionSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class JobSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class AuthorSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
#     def get_is_current(self, obj):
#     def __init__(self, *args, **kwargs):
# 
# Path: display/serializers.py
# class CardSizeSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class StylesheetSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class ScriptSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class TemplateSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# 
# Path: organization/serializers.py
# class SectionSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class TagSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class SiteSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# 
# Path: sports/serializers.py
# class SportSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class SchoolSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:
# class GameSerializer(serializers.HyperlinkedModelSerializer):
#     class Meta:


# Path: core/serializers.py
import inspect
from rest_framework import serializers
from django.db.models.fields import Field
from django.contrib.contenttypes.models import ContentType
from attachments import serializers as attachments_serializers
from authors import serializers as authors_serializers
from display import serializers as display_serializers
from organization import serializers as organization_serializers
from sports import serializers as sports_serializers
from . import models
from . import utils

    is_published = serializers.SerializerMethodField()
    is_breaking = serializers.SerializerMethodField()

    class Meta:
        model = models.Story
        exclude = ('assignment_slug', 'status', 'summary', 'angle', 'sources',
                   'late_run', 'created')

    def __init__(self, *args, **kwargs):
        super(StorySerializer, self).__init__(*args, **kwargs)
        request = self.context.get('request')
        if request and request.user.is_authenticated():
            # sometimes a serializer is initialized without a request, so we
            # must check for its existence first
            self.fields['assignment_slug'] = serializers.CharField()
            self.fields['status'] = StatusSerializer()
            self.fields['summary'] = serializers.CharField()
            self.fields['angle'] = serializers.CharField()
            self.fields['sources'] = serializers.CharField()
            self.fields['late_run'] = serializers.BooleanField()
            self.fields['created'] = serializers.DateTimeField()

    def get_is_published(self, obj):
        return obj.is_published()

    def get_is_breaking(self, obj):
        return obj.is_breaking()


class PageSerializer(BodyTextSerializer):

    alternate_template = display_serializers.TemplateSerializer()