django-orchestra-test/orchestra/apps/users/roles/posix/serializers.py

15 lines
294 B
Python
Raw Normal View History

2014-09-30 10:20:23 +00:00
from rest_framework import serializers
from orchestra.api import router
from .models import POSIX
class POSIXSerializer(serializers.ModelSerializer):
class Meta:
model = POSIX
fields = ('home', 'shell')
router.insert('users', 'posix', POSIXSerializer, required=False)