vandersonmota/model_mommy — pull request #71 by berinhard (2013-02-14 19:22:12+00:00)
Title: Fixes issue #70

This pull requests solves the foreign key field lookup problem with recipes as shown at issue #70. If followed the approach suggested by @vandersonmota that involves the creation of a new class to represents a new recipe being used as a foreign key value during a creation of another recipe. With this approach, it gets more easier to differentiate a callable object from a recipe object, as was necessary to resolve this issue.

After the implemenation, I noticed two things:

* There was some code repetition with the `"__" in field_name` little magic because it has already been used on model_mommy's make method for the same purpose.
* There are two functions at `mommy.py` that could be well placed at another module. They are the `filter_fk_attrs` and the `get_required_values`.

I think both methods could be fitted into an `utils.py` or something togheter with the `"__"` magic that I listed previously. This would improve the coesion of `mommy.py` and would avoid code repetition. What do you think?