enabled keys
diff --git a/plstackapi/planetstack/serializers.py b/plstackapi/planetstack/serializers.py
index 81a4ba8..4a38059 100644
--- a/plstackapi/planetstack/serializers.py
+++ b/plstackapi/planetstack/serializers.py
@@ -34,7 +34,18 @@
'slice_memberships',
'site_privileges')
-
+class KeySerializer(serializers.HyperlinkedModelSerializer):
+ id = serializers.Field()
+ user = serializers.HyperlinkedRelatedField(view_name='user-detail')
+ class Meta:
+ model = Key
+ fields = ('id',
+ 'name',
+ 'key',
+ 'type',
+ 'blacklisted',
+ 'user')
+
class SliceSerializer(serializers.HyperlinkedModelSerializer):
# HyperlinkedModelSerializer doesn't include the id by default
@@ -154,6 +165,7 @@
serializerLookUp = {
Role: RoleSerializer,
User: UserSerializer,
+ Key: KeySerializer,
Site: SiteSerializer,
Slice: SliceSerializer,
Node: NodeSerializer,