add nick
[laas.git] / src / api / serializers / old_serializers.py
1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 from rest_framework import serializers
12
13 from account.models import UserProfile
14
15
16 class UserSerializer(serializers.ModelSerializer):
17     username = serializers.CharField(source='user.username')
18
19     class Meta:
20         model = UserProfile
21         fields = ('user', 'username', 'ssh_public_key', 'pgp_public_key', 'email_addr')