base_serializers.py 378 B

1234567891011121314151617
  1. from rest_framework import serializers
  2. from ..models import Project
  3. class ProjectReferenceSerializer(serializers.ModelSerializer):
  4. """
  5. Non-detailed view used in:
  6. - /api/0/projects/<org-slug>/project-slug>/issues/
  7. """
  8. id = serializers.CharField(read_only=True)
  9. class Meta:
  10. model = Project
  11. fields = ("platform", "slug", "id", "name")