You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if we could treat foreign keys like we would a recipe in baker.make(). Right now it seems like whatever foreign key you use has to be imported into that baker_recipes.py file.
It would be even nicer if this would handle things gracefully, if you had for example one recipe that creates an order tied to an account, and a recipe that creates an account with several orders, both in different baker_recipes.py files.
Actual behavior
I get an error in the form of:
AttributeError: module 'order.baker_recipes' has no attribute 'account.account'
Reproduction Steps
Create two baker_recipes.py files in different django apps/whatever and try to use them together without importing recipes from the other.
Versions
Python: 3.7
Django: 2.2
Model Bakery: 1.0.2
The text was updated successfully, but these errors were encountered:
It would be nice if we could treat foreign keys like we would a recipe in
baker.make()
. Right now it seems like whatever foreign key you use has to be imported into thatbaker_recipes.py
file.Expected behavior
It would be nice to be able to do something like:
It would be even nicer if this would handle things gracefully, if you had for example one recipe that creates an order tied to an account, and a recipe that creates an account with several orders, both in different
baker_recipes.py
files.Actual behavior
I get an error in the form of:
Reproduction Steps
Create two
baker_recipes.py
files in different django apps/whatever and try to use them together without importing recipes from the other.Versions
Python: 3.7
Django: 2.2
Model Bakery: 1.0.2
The text was updated successfully, but these errors were encountered: