Using inheritance to choose field generation.

79 views
Skip to first unread message

vanders...@gmail.com

unread,
Aug 24, 2013, 5:35:00 PM8/24/13
to model...@googlegroups.com
Guys, we have this pending PR: https://github.com/vandersonmota/model_mommy/pull/109

It changes the way we detect fields using Inheritance instead of a explicit mapping.

Personally, i wish to maintain random generation strict as possible, using it only with the django default fields, in order to avoid crazy errors that can be caused by multiple inheritance.

Also, i think it is a good idea letting the user handling custom fields generation in a explicit fashion.


What do you think?

--
Vanderson Mota dos Santos

Italo Maia

unread,
Aug 27, 2013, 8:56:11 PM8/27/13
to model...@googlegroups.com
Vanderson, could you provide an example showing this misbehavior? I also think this merge could pop "weird" stuff but cant visualize it quite yet. A integer field would still need an Integer argument, even if it is a subclass, I believe.

vanders...@gmail.com

unread,
Aug 27, 2013, 8:58:50 PM8/27/13
to Italo Maia, model...@googlegroups.com
Well, i like to let the decision about which generator should be user when it comes to a custom field, even if it inherits from the default ones, in order to keep mommy's guesses minimum as possible.


2013/8/27 Italo Maia <italo...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Model Mommy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to model-mommy...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages