将此内容的<apipAccessbility>
元素替换为多行中具有XML
类型列的新元素:
<Item title="1234" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
<ItemBody>xyz</ItemBody>
<apipAccessibility xmlns="http://www.imsglobal.org/xsd/apip/apipv1p0/imsapip_qtiv1p0">
<accessibilityInfo>
Blablah
</accessibilityInfo>
</apipAccessibility>
</Item>
一旦元素更新,它应该如下所示:
<Item title="1234" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
<ItemBody>xyz</ItemBody>
<apipAccessibility xmlns="http://www.imsglobal.org/xsd/apip/apipv1p0/imsapip_qtiv1p0"/>
</Item>
答案 0 :(得分:2)
File "/home/bgarcial/.virtualenvs/neurorehabilitation_projects_dev/lib/python3.4/site-packages/rest_framework/relations.py", line 355, in to_representation
raise ImproperlyConfigured(msg % self.view_name)
django.core.exceptions.ImproperlyConfigured: Could not resolve URL for hyperlinked relationship using view name "patientprofile". You may have failed to include the related model in your API, or incorrectly configured the `lookup_field` attribute on this field.
[08/Mar/2016 16:05:45] "GET /api/rehabilitation-session/ HTTP/1.1" 500 165647
的 LiveDemo
强>
输出:
UPDATE tab
SET col.modify('
declare namespace NS="http://www.imsglobal.org/xsd/imsqti_v2p2";
declare namespace NS2="http://www.imsglobal.org/xsd/apip/apipv1p0/imsapip_qtiv1p0";
delete /NS:Item/NS2:apipAccessibility/*')
-- WHERE id = 1;