Closed boonya closed 8 years ago
Awesome!
Btw. I didn't get the idea about init for this task. Can you explain it a bit. May be an example?
Пн, 14 бер. 2016 00:35 користувач Roman notifications@github.com пише:
Awesome!
— Reply to this email directly or view it on GitHub https://github.com/ets-labs/domain_models/pull/32#issuecomment-196070384 .
Yep, sure!
I meant something like this:
for name, field in six.iteritems(self.__class__.__fields__):
field.set_builtin_type(self, name, data.get(name))
@rmk135 , no no no... I meant this phrase from the description of the issue -
Notes: Current logic should work for DomainModel.init() as well.
What did you mean? Possibility to pass dict as argument of constructor or what?
It partly works DomainModel(**dict())
but not for field.Model
Yeah, exactly like that...
DomainModel(**dict())
Will it be a big deal to add such "on the fly" converting for fields.Model
and fields.Collection
?
Hey @boonya,
First of all, sorry for the delay. I put some extremely minor comments, but it looks awesome!
Please, fill free to merge it right when you will have a time 👍 ;)
Implementation of issue #21