from rest_framework import serializers 
from .models import Career, Mentor, BlogPost


class BlogPostSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogPost
        fields = ('id', 'title', 'description', 'body', 'date', 'mentor')

class MentorSerializer(serializers.ModelSerializer):
    posts = BlogPostSerializer(many=True, read_only=True)

    class Meta:
        model = Mentor
        fields = ('id', 'name', 'profession', 'advice_topics', 'image_url', 'company', 'email', 'career', 'posts')

class CareerSerializer(serializers.ModelSerializer):
    mentors = MentorSerializer(many=True, read_only=True)

    class Meta:
        model = Career
        fields = ('id', 'career_field', 'occupations', 'onetcode', 'state', 'image', 'mentors')


15557272914506a24cbb1232f37bc7f640000c0c
<mask token>


class CareerSerializer(serializers.ModelSerializer):
    mentors = MentorSerializer(many=True, read_only=True)


    class Meta:
        model = Career
        fields = ('id', 'career_field', 'occupations', 'onetcode', 'state',
            'image', 'mentors')

<mask token>


class MentorSerializer(serializers.ModelSerializer):
    <mask token>


    class Meta:
        model = Mentor
        fields = ('id', 'name', 'profession', 'advice_topics', 'image_url',
            'company', 'email', 'career', 'posts')


class CareerSerializer(serializers.ModelSerializer):
    mentors = MentorSerializer(many=True, read_only=True)


    class Meta:
        model = Career
        fields = ('id', 'career_field', 'occupations', 'onetcode', 'state',
            'image', 'mentors')

<mask token>


class BlogPostSerializer(serializers.ModelSerializer):


    class Meta:
        model = BlogPost
        fields = 'id', 'title', 'description', 'body', 'date', 'mentor'


class MentorSerializer(serializers.ModelSerializer):
    posts = BlogPostSerializer(many=True, read_only=True)


    class Meta:
        model = Mentor
        fields = ('id', 'name', 'profession', 'advice_topics', 'image_url',
            'company', 'email', 'career', 'posts')


class CareerSerializer(serializers.ModelSerializer):
    mentors = MentorSerializer(many=True, read_only=True)


    class Meta:
        model = Career
        fields = ('id', 'career_field', 'occupations', 'onetcode', 'state',
            'image', 'mentors')

from rest_framework import serializers
from .models import Career, Mentor, BlogPost


class BlogPostSerializer(serializers.ModelSerializer):


    class Meta:
        model = BlogPost
        fields = 'id', 'title', 'description', 'body', 'date', 'mentor'


class MentorSerializer(serializers.ModelSerializer):
    posts = BlogPostSerializer(many=True, read_only=True)


    class Meta:
        model = Mentor
        fields = ('id', 'name', 'profession', 'advice_topics', 'image_url',
            'company', 'email', 'career', 'posts')


class CareerSerializer(serializers.ModelSerializer):
    mentors = MentorSerializer(many=True, read_only=True)


    class Meta:
        model = Career
        fields = ('id', 'career_field', 'occupations', 'onetcode', 'state',
            'image', 'mentors')

from rest_framework import serializers 
from .models import Career, Mentor, BlogPost


class BlogPostSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogPost
        fields = ('id', 'title', 'description', 'body', 'date', 'mentor')

class MentorSerializer(serializers.ModelSerializer):
    posts = BlogPostSerializer(many=True, read_only=True)

    class Meta:
        model = Mentor
        fields = ('id', 'name', 'profession', 'advice_topics', 'image_url', 'company', 'email', 'career', 'posts')

class CareerSerializer(serializers.ModelSerializer):
    mentors = MentorSerializer(many=True, read_only=True)

    class Meta:
        model = Career
        fields = ('id', 'career_field', 'occupations', 'onetcode', 'state', 'image', 'mentors')

