Re: Cumbersome object creation

2005-12-31 Thread Wojtek/brandlay.com
Why not fix it then? :)

Re: Cumbersome object creation

2005-12-30 Thread Brant Harris
It's a simple and old bug. If you do: mod = MyModel(anything=something) It'll work as expected. You need at least one keyword argument in there. So, in your example: """mod = MyModel(foo_id=1) mod.bar_id = 2 mod.save()""" Works. On 12/30/05, Wojtek/brandlay.com <[EMAIL PROTECTED]> wrote: > > S

Cumbersome object creation

2005-12-30 Thread Wojtek/brandlay.com
So i did: def MyModel(meta.Model): foo = meta.ForeignKey(Foo) bar = meta.ForeignKey(Bar) added = meta.Date(auto_add_now = True) mod = MyModel() mod.foo_id = 1 mod.bar_id = 2 mod.save() And it did not work, saying that my object has no 'id' attribute. Why would it have an 'id' attribute since