Format groups/policy/metadata in JSON/XML replies.
[pithos] / pithos / api / templates / containers.xml
index 681ab1e..fb635b9 100644 (file)
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
+{% load get_type %}
 <account name="{{ account }}">
   {% for container in containers %}
   <container>
   {% for key, value in container.items %}
-    <{{ key }}>{{ value }}</{{ key }}>
+    <{{ key }}>{% if value|get_type == "dict" %}
+      {% for k, v in value.iteritems %}<key>{{ k }}</key><value>{{ v }}</value>
+      {% endfor %}
+    {% else %}{{ value }}{% endif %}</{{ key }}>
   {% endfor %}
   </container>
   {% endfor %}