1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00
awx/lib/main/serializers.py
2013-03-21 00:12:03 -04:00

12 lines
395 B
Python

from django.contrib.auth.models import User as DjangoUser
from lib.main.models import User, Organization, Project
from rest_framework import serializers, pagination
class OrganizationSerializer(serializers.ModelSerializer):
url = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Organization
fields = ('url', 'name', 'description')