From 03c376242eec907be0203a3e6ce2dcdf324b76a5 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Fri, 4 May 2012 19:11:35 -0400 Subject: [PATCH] Tag ID in API --- snipts/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snipts/api.py b/snipts/api.py index ab410e4..16eb8a7 100644 --- a/snipts/api.py +++ b/snipts/api.py @@ -48,7 +48,7 @@ class PublicTagResource(ModelResource): queryset = queryset.annotate(count=models.Count('taggit_taggeditem_items__id')) queryset = queryset.order_by('-count', 'name') resource_name = 'tag' - fields = ['pk', 'name',] + fields = ['id', 'name',] allowed_methods = ['get'] cache = SimpleCache() @@ -118,7 +118,7 @@ class PrivateTagResource(ModelResource): class Meta: queryset = Tag.objects.all() resource_name = 'tag' - fields = ['pk', 'name',] + fields = ['id', 'name',] allowed_methods = ['get'] authentication = ApiKeyAuthentication() authorization = Authorization()