[CKAN-support] Structure of c.pkg?
Carlos Quiros
cquiros at qlands.com
Wed Mar 19 14:46:48 UTC 2014
Hi,
I am having this code:
import ckan.plugins.toolkit as toolkit
from ckan.lib.base import c, abort
from ckan.model import Package
class metadataDDIController(toolkit.BaseController):
def getMetadataDDI(self,id):
toolkit.response.content_type = 'application/xml'
c.pkg = Package.get(id)
if c.pkg is None:
abort(404, 'Dataset not found')
return '<?xml version="1.0" encoding="utf-8"?><body>' +
c.pkg.description + '</body>'
But I get that 'Package' object has no attribute 'description'
How can I get the information of the package, particularly the extras?
Thanks,
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ckan-support/attachments/20140319/f3ea4df1/attachment-0002.html>
More information about the ckan-support
mailing list