This commit is contained in:
Cameron Dawson 2014-02-07 18:40:09 -08:00
Родитель 03a6af51e3
Коммит 0bdd8de8fd
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -6,7 +6,7 @@ from collections import defaultdict
from django.db import models
from django.conf import settings
from rest_framework import viewsets
from rest_framework import viewsets, serializers
from rest_framework.response import Response
from rest_framework.decorators import action, link
from rest_framework.reverse import reverse
@ -589,9 +589,21 @@ class JobGroupViewSet(viewsets.ReadOnlyModelViewSet):
model = models.JobGroup
class RepositoryGroupSerializer(serializers.ModelSerializer):
class Meta:
model = models.RepositoryGroup
fields = ('name', 'description')
class RepositorySerializer(serializers.ModelSerializer):
repository_group = RepositoryGroupSerializer()
class Meta:
model = models.Repository
class RepositoryViewSet(viewsets.ReadOnlyModelViewSet):
"""ViewSet for the refdata Repository model"""
model = models.Repository
serializer_class = RepositorySerializer
class MachinePlatformViewSet(viewsets.ReadOnlyModelViewSet):