<commit_before>from rest_framework import serializers

from twospaces.conference.models import Session, Conference, SponsorshipLevel, Sponsor, Room
from twospaces.profiles.models import User
from twospaces.profiles.serializers import UserPublicSizzler
from twospaces.utils import DynamicFieldsMixin


class ProposedReadSizzler(DynamicFieldsMixin, serializers.ModelSerializer):
  user = UserPublicSizzler(exclude=('biography', 'website', 'social_handles'))
  level = serializers.CharField(source='get_level_display', read_only=True)
  stype = serializers.CharField(source='get_stype_display', read_only=True)

  class Meta:
    model = Session
    fields = ('id', 'user', 'name', 'description', 'level', 'stype', 'slides',
              'start', 'duration')
    read_only_fields = fields


class SessionSizzler(DynamicFieldsMixin, serializers.ModelSerializer):

  class Meta:
    model = Session
    fields = ('name', 'description', 'level', 'stype', 'slides',
              'special_requirements')


class ConferenceReadSizzler(DynamicFieldsMixin, serializers.ModelSerializer):

  class Meta:<commit_msg>Added Session.video to the SessionSizzler serializer and ProposedReadSizzler<commit_after>from rest_framework import serializers

from twospaces.conference.models import Session, Conference, SponsorshipLevel, Sponsor, Room
from twospaces.profiles.models import User
from twospaces.profiles.serializers import UserPublicSizzler
from twospaces.utils import DynamicFieldsMixin


class ProposedReadSizzler(DynamicFieldsMixin, serializers.ModelSerializer):
  user = UserPublicSizzler(exclude=('biography', 'website', 'social_handles'))
  level = serializers.CharField(source='get_level_display', read_only=True)
  stype = serializers.CharField(source='get_stype_display', read_only=True)

  class Meta:
    model = Session
    fields = ('id', 'user', 'name', 'description', 'level', 'stype', 'slides',
              'video', 'start', 'duration')
    read_only_fields = fields


class SessionSizzler(DynamicFieldsMixin, serializers.ModelSerializer):

  class Meta:
    model = Session
    fields = ('name', 'description', 'level', 'stype', 'slides', 'video',
              'special_requirements')


class ConferenceReadSizzler(DynamicFieldsMixin, serializers.ModelSerializer):

  class Meta:
{'fraction_non_alphanumeric': 0.10441240716470074, 'fraction_numerical': 0.0, 'mean_word_length': 5.876876876876877, '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': '7231248', 'n_tokens_mistral': 673, 'n_tokens_neox': 653, 'n_words': 152}