Provide a document's rfc number (if any) as part of the document fields exposed in the json api.

- Legacy-Id: 9923
This commit is contained in:
Henrik Levkowetz 2015-07-30 18:57:44 +00:00
parent faecc697be
commit ab8d018760

View file

@ -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'