Fix url names in json template
authorMikko Värri <vmj@linuxbox.fi>
Mon, 20 Sep 2010 23:13:00 +0000 (02:13 +0300)
committerMikko Värri <vmj@linuxbox.fi>
Mon, 20 Sep 2010 23:13:00 +0000 (02:13 +0300)
recycloid_api/templates/recycloid_api/response.json

index 496f7e2..000ef25 100644 (file)
@@ -40,9 +40,9 @@
                     "description": "{{ owner.description|escape }}",
                     "image": "{{ owner.thumbnail }}",
                     "links": {
-                        "self": { "@href": "{% url recycloid-api-owners owner.uuid %}" },
-                        "stashes": { "@href": "{% url recycloid-api-owners owner.uuid %}stashes/" },
-                        "server": { "@href": "{% url recycloid-api-servers owner.server.uuid %}" }
+                        "self": { "@href": "{% url recycloid-api-owner owner.uuid %}" },
+                        "stashes": { "@href": "{% url recycloid-api-owner owner.uuid %}stashes/" },
+                        "server": { "@href": "{% url recycloid-api-server owner.server.uuid %}" }
                     }
                 },
 {% endfor %}
                     },
                     "items": { "@items": "{{ stash.item_count }}" },
                     "links": {
-                        "self": { "@href": "{% url recycloid-api-stashes stash.uuid %}" },
-                        "items": { "@href": "{% url recycloid-api-stashes stash.uuid %}items/" },
-                        "owner": { "@href": "{% url recycloid-api-owners stash.owner.uuid %}" },
-                        "server": { "@href": "{% url recycloid-api-servers stash.server.uuid %}" }
+                        "self": { "@href": "{% url recycloid-api-stash stash.uuid %}" },
+                        "items": { "@href": "{% url recycloid-api-stash stash.uuid %}items/" },
+                        "owner": { "@href": "{% url recycloid-api-owner stash.owner.uuid %}" },
+                        "server": { "@href": "{% url recycloid-api-server stash.server.uuid %}" }
                     }
                 },
 {% endfor %}
@@ -92,9 +92,9 @@
                     "created": "{{ item.created|timestamp }}",
                     "image": "{{ item.thumbnail }}",
                     "links": {
-                        "self": { "@href": "{% url recycloid-api-items item.uuid %}" },
-                        "images": { "@href": "{% url recycloid-api-items item.uuid %}images/" },
-                        "stash": { "@href": "{% url recycloid-api-stashes item.stash.uuid %}" }
+                        "self": { "@href": "{% url recycloid-api-item item.uuid %}" },
+                        "images": { "@href": "{% url recycloid-api-item item.uuid %}images/" },
+                        "stash": { "@href": "{% url recycloid-api-stash item.stash.uuid %}" }
                     }
                 },
 {% endfor %}
                     "@item": "{{ image.item.uuid }}",
                     "url": "{{ image.url }}",
                     "links": {
-                        "self": { "@href": "{% url recycloid-api-images image.uuid %}" },
-                        "item": { "@href": "{% url recycloid-api-items image.item.uuid %}" }
+                        "self": { "@href": "{% url recycloid-api-image image.uuid %}" },
+                        "item": { "@href": "{% url recycloid-api-item image.item.uuid %}" }
                     }
                 },
 {% endfor %}