12 lines
431 B
Python
12 lines
431 B
Python
from rest_framework import serializers
|
|
|
|
from .models import DataStage
|
|
from api.organization.models import Organizacion
|
|
|
|
class DataStageSerializer(serializers.ModelSerializer):
|
|
organizacion = serializers.PrimaryKeyRelatedField(required=False, allow_null=True, queryset=Organizacion.objects.all())
|
|
|
|
class Meta:
|
|
model = DataStage
|
|
fields = '__all__'
|
|
read_only_fields = ('id', 'created_at', 'updated_at') |