diff options
author | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2014-05-21 14:01:41 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2014-05-21 14:01:41 +0200 |
commit | 790e8ea2db7a68d7074809124dfd82c3b05b925b (patch) | |
tree | 7ff508c53afc998290475a1b507535db99cec1db /docs | |
parent | 46ae739823bc9d9c3a176f20058d65097c22cb66 (diff) | |
download | factory-boy-790e8ea2db7a68d7074809124dfd82c3b05b925b.tar factory-boy-790e8ea2db7a68d7074809124dfd82c3b05b925b.tar.gz |
Introduce back missing doc about migrating FACTROY_DJANGO_GET_OR_CREATE.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/orms.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/orms.rst b/docs/orms.rst index d3d98c9..6a942a6 100644 --- a/docs/orms.rst +++ b/docs/orms.rst @@ -40,6 +40,11 @@ All factories for a Django :class:`~django.db.models.Model` should use the attributes, the base object will be :meth:`saved <django.db.models.Model.save>` once all post-generation hooks have run. + .. attribute:: FACTORY_DJANGO_GET_OR_CREATE + + .. deprecated:: 2.4.0 + See :attr:`DjangoOptions.django_get_or_create`. + .. class:: DjangoOptions(factory.base.FactoryOptions) @@ -47,6 +52,8 @@ All factories for a Django :class:`~django.db.models.Model` should use the .. attribute:: django_get_or_create + .. versionadded:: 2.4.0 + Fields whose name are passed in this list will be used to perform a :meth:`Model.objects.get_or_create() <django.db.models.query.QuerySet.get_or_create>` instead of the usual :meth:`Model.objects.create() <django.db.models.query.QuerySet.create>`: |