From ab8d0187605100aa8044a78f013246cc77f7e735 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 30 Jul 2015 18:57:44 +0000 Subject: [PATCH] Provide a document's rfc number (if any) as part of the document fields exposed in the json api. - Legacy-Id: 9923 --- ietf/doc/resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/doc/resources.py b/ietf/doc/resources.py index 5e595bdee..35e837c15 100644 --- a/ietf/doc/resources.py +++ b/ietf/doc/resources.py @@ -1,6 +1,6 @@ # Autogenerated by the mkresources management command 2014-12-14 19:50 from tastypie.resources import ModelResource -from tastypie.fields import ToOneField, ToManyField +from tastypie.fields import ToOneField, ToManyField, CharField from tastypie.constants import ALL, ALL_WITH_RELATIONS from ietf import api @@ -86,6 +86,7 @@ class DocumentResource(ModelResource): states = ToManyField(StateResource, 'states', null=True) tags = ToManyField(DocTagNameResource, 'tags', null=True) authors = ToManyField(EmailResource, 'authors', null=True) + rfc = CharField(attribute='rfc_number', null=True) class Meta: queryset = Document.objects.all() #resource_name = 'document'