commit | 5a8b2854825aca06b6021273efb0e8a5026f7b12 | [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 | 41d794a12399a830dda3607604cdade9cff7aaab [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)