Skip to content

Instantly share code, notes, and snippets.

@moeinserpico
Created September 30, 2019 06:08
Show Gist options
  • Save moeinserpico/3f3b99d5aca2a6154f26b83fab2da22c to your computer and use it in GitHub Desktop.
Save moeinserpico/3f3b99d5aca2a6154f26b83fab2da22c to your computer and use it in GitHub Desktop.
from rest_framework import serializers
from .models import *
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employees
fields = "__all__"
class DepartmentsSerializer(serializers.ModelSerializer):
class Meta:
model = Departments
fields = "__all__"
class DeptEmpSerializer(serializers.ModelSerializer):
class Meta:
model = DeptEmp
fields = "__all__"
class DeptManagerSerializer(serializers.ModelSerializer):
class Meta:
model = DeptManager
fields = "__all__"
class SalariesSerializer(serializers.ModelSerializer):
class Meta:
model = Salaries
fields = "__all__"
class TitlesSerializers(serializers.ModelSerializer):
class Meta:
model = Titles
fields = "__all__"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment