diff --git a/physionet-django/export/serializers.py b/physionet-django/export/serializers.py index 286c03f099..ae162ee52f 100644 --- a/physionet-django/export/serializers.py +++ b/physionet-django/export/serializers.py @@ -7,13 +7,17 @@ class LicenseSerializer(serializers.ModelSerializer): class Meta: model = License - fields = ('name',) + fields = ( + 'name', + ) class DUASerializer(serializers.ModelSerializer): class Meta: model = DUA - fields = ('name',) + fields = ( + 'name', + ) class PublishedProjectSerializer(serializers.ModelSerializer): @@ -22,19 +26,43 @@ class PublishedProjectSerializer(serializers.ModelSerializer): class Meta: model = PublishedProject - fields = ('slug', 'title', 'abstract', 'license', 'dua', 'main_storage_size', - 'compressed_storage_size') + fields = ( + 'slug', + 'title', + 'abstract', + 'license', + 'dua', + 'main_storage_size', + 'compressed_storage_size', + ) class ProjectVersionsSerializer(serializers.ModelSerializer): class Meta: model = PublishedProject - fields = ('slug', 'title', 'version', 'abstract') + fields = ( + 'slug', + 'title', + 'version', + 'abstract', + ) class PublishedProjectDetailSerializer(serializers.ModelSerializer): + license = LicenseSerializer() + class Meta: model = PublishedProject - fields = ("title", "abstract", "version", "short_description", - "project_home_page", "publish_datetime", "doi", "slug", "main_storage_size", - "compressed_storage_size") + fields = ( + 'slug', + 'title', + 'version', + 'abstract', + 'license', + 'short_description', + 'project_home_page', + 'publish_datetime', + 'doi', + 'main_storage_size', + 'compressed_storage_size', + )