diff --git a/backend/app/models/__init__.py b/backend/app/models/__init__.py index 8604388..c321411 100644 --- a/backend/app/models/__init__.py +++ b/backend/app/models/__init__.py @@ -14,3 +14,4 @@ from .project import Project, ProjectMembership from .selector import Selector from .environment import Environment +from .person import Person diff --git a/backend/app/serializers/__init__.py b/backend/app/serializers/__init__.py index d7977d7..fe9d808 100644 --- a/backend/app/serializers/__init__.py +++ b/backend/app/serializers/__init__.py @@ -1 +1,2 @@ from .register_serializer import * +from .person_serializer import PersonSerializer diff --git a/backend/app/serializers/person_serializer.py b/backend/app/serializers/person_serializer.py new file mode 100644 index 0000000..ecab698 --- /dev/null +++ b/backend/app/serializers/person_serializer.py @@ -0,0 +1,14 @@ +from rest_framework import serializers + +from app.models.person import Person + + +class PersonSerializer(serializers.ModelSerializer): + class Meta(object): + model = Person + fields = ["email", "properties", "environment"] + extra_kwargs = { + "email": {"required": True}, + "properties": {"required": True}, + "environment": {"required": True}, + }