Revision 10e9ee83
b/edumanage/views.py | ||
---|---|---|
929 | 929 |
ET._namespace_map["http://www.w3.org/2001/XMLSchema-instance"] = 'xsi' |
930 | 930 |
root = ET.Element("institutions") |
931 | 931 |
NS_XSI = "{http://www.w3.org/2001/XMLSchema-instance}" |
932 |
root.set(NS_XSI + "noNamespaceSchemaLocation", "institutions.xsd")
|
|
932 |
root.set(NS_XSI + "noNamespaceSchemaLocation", "institution.xsd") |
|
933 | 933 |
#root.attrib["xsi:noNamespaceSchemaLocation"] = "institution.xsd" |
934 | 934 |
institutions = Institution.objects.all() |
935 | 935 |
for institution in institutions: |
... | ... | |
982 | 982 |
instUrl.attrib["lang"] = url.lang |
983 | 983 |
instUrl.text = url.url |
984 | 984 |
|
985 |
instTs = ET.SubElement(instElement, "ts") |
|
986 |
instTs.text = "%s" %inst.ts.isoformat() |
|
985 | 987 |
#Let's go to Institution Service Locations |
986 | 988 |
|
987 | 989 |
for serviceloc in inst.institution.serviceloc_set.all(): |
... | ... | |
1046 | 1048 |
instLocUrl = ET.SubElement(instLocation, "%s_URL"%(url.urltype)) |
1047 | 1049 |
instLocUrl.attrib["lang"] = url.lang |
1048 | 1050 |
instLocUrl.text = url.url |
1049 |
|
|
1050 |
instTs = ET.SubElement(instElement, "ts") |
|
1051 |
instTs.text = "%s" %inst.ts.isoformat() |
|
1052 | 1051 |
|
1053 | 1052 |
return render_to_response("general/institution.xml", {"xml":to_xml(root)},context_instance=RequestContext(request,), mimetype="application/xml") |
1054 | 1053 |
|
Also available in: Unified diff