model_bakery
model_bakery copied to clipboard
Object factory for Django
**Describe the change** Make code compatible with future Django release. ``` model_bakery/timezone.py:6: RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated. Please update your code to use datetime.timezone.utc instead. from django.utils.timezone import utc...
## Expected behavior I expect to get a generator of datetimes. ## Actual behavior I got an exception. ## Reproduction Steps ```pycon >>> from model_bakery.recipe import seq >>> from datetime...
**Describe the issue** I have come across a memory leak when running a particular test. We were using version 1.6.0 of model_bakery, and only when I reverted to version 1.0.0...
In #206, bulk creation of related objects was introduced. However, for `_quantity=N`, it will cause N calls to `save()` of the related class, causing N database queries. [This comment](https://github.com/model-bakers/model_bakery/pull/206#issuecomment-866035911) claimed...
Probably related to #202, as it is the same issue applied to ManyToManyField. When using `baker.make` with `_bulk_create=True`, it will silently ignore arguments that should be used to fill many-to-many...
If `django.contrib.contenttypes` is not installed, Model Bakery fails to run. Model bakery doesn't declare a hard dependency on content types, and it doesn't look like it needs one. It just...
To reproduce ```python # models.py from django.db import models class MyModel(models.Model): some_date = models.DateTimeField(auto_now_add=True) # test code from model_mommy import mommy thing = mommy.make(MyModel, some_date="1985-10-21") print(thing.some_date) ``` Expected: * The...
Since the repo has automated changelog checks in the CI, are you open to using something that minimizes conflicts in CHANGELOG.md? The simplest I've found is to have a `changelog/unreleased`...
Hi! I'd like to hear if this is a feature that if not already possible somehow would be something worth considering. My use case is that I have models that...