commit | 78e636ce3e874724759c3eca0b0c0801eaf0792b | [log] [tgz] |
---|---|---|
author | Sapan Bhatia <gwsapan@gmail.com> | Tue Nov 03 13:51:33 2015 -0500 |
committer | Sapan Bhatia <gwsapan@gmail.com> | Tue Nov 03 13:51:33 2015 -0500 |
tree | f69b345dc5b78ea089952650196e5e886039f2e1 | |
parent | fe91d4e5f4114e0735d768b30da7a770dd4c486c [diff] |
Need to save an object before setting it to a property of another object
diff --git a/xos/helloworld/view.py b/xos/helloworld/view.py index 212a432..7024747 100644 --- a/xos/helloworld/view.py +++ b/xos/helloworld/view.py
@@ -36,6 +36,7 @@ i.save() h = Hello(name=hello_name,instance_backref=i) h.save() + w = World(hello=h,name=world_name) w.save() t = template.Template(head_template + 'Done. New instance id: %r'%i.pk + self.tail_template)