Created
September 30, 2019 06:08
-
-
Save moeinserpico/3f3b99d5aca2a6154f26b83fab2da22c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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