summaryrefslogtreecommitdiff
path: root/docs/reference.rst
Commit message (Collapse)AuthorAge
* Fix typoJeff Widman2016-04-19
|
* Add Traits (Closes #251).Raphaël Barrois2016-04-02
| | | | | | Based on a boolean flag, those will alter the definitions of the current factory, taking precedence over pre-defined behavior but overridden by callsite-level arguments.
* Add a new Params section to factories.Raphaël Barrois2016-04-02
| | | | | | | | | | | | This handles parameters that alter the declarations of a factory. A few technical notes: - A parameter's outcome may alter other parameters - In order to fix that, we perform a (simple) cyclic definition detection at class declaration time. - Parameters may only be either naked values or ComplexParameter subclasses - Parameters are never passed to the underlying class
* Merge pull request #252 from jmcarp/patch-1Raphaël Barrois2016-02-21
|\ | | | | Clarify sequence behavior on inheritance
| * Clarify sequence behavior on inheritanceJoshua Carp2015-11-23
| | | | | | Sequences are only shared via inheritance if the model of the subclass is the same as or a subclass of the model of the parent class. Clarify the docs on this point.
* | factory: LazyFunction to just call a function in the simplest caseHervé Cauwelier2016-02-12
| | | | | | | | No need to wrap it in a lambda to strip the object argument from LazyAttribute or the sequence argument from Sequence.
* | Clarify the use of SelfAttribute in RelatedFactory (Closes #264)Raphaël Barrois2016-02-09
|/
* Fix obsolete text in docs (Closes #245, #248, #249).Raphaël Barrois2015-11-07
| | | | Thanks a lot to Jeff Widman for spotting them!
* Docs: Document Faker.add_provider (Closes #218)Raphaël Barrois2015-10-20
|
* Docs: fix minor typo.Raphaël Barrois2015-05-31
| | | | As spotted by @proofit404
* Add factory.Faker()Raphaël Barrois2015-05-22
| | | | | This relies on the ``fake-factory`` library, and provides realistic random values for most field types.
* Add Meta.rename to handle name conflicts (See #206).Raphaël Barrois2015-05-20
| | | | | | Define ``Meta.rename = {'attrs': 'attributes'}`` if your model expects a ``attributes`` kwarg but you can't define it since it's already reserved by the ``Factory`` class.
* Fix minor typo (Closes #194).Raphaël Barrois2015-04-14
| | | | Thanks to @DasAllFolks for spotting it!
* Docs: fix default strategy (Closes #158).Raphaël Barrois2015-03-03
|
* Fix reference docs (Closes #166, #167).Raphaël Barrois2014-11-25
| | | | | | | | Use ``obj`` for ``@post_generation``-decorated methods, instead of ``self``: this makes it clearer that the ``obj`` is an instance of the model, and not of the ``Factory``. Thanks to @jamescooke & @NiklasMM for spotting the typo.
* Fix typo in docsRaphaël Barrois2014-11-18
|
* Remove deprecated features.Raphaël Barrois2014-11-18
| | | | | This disables the ``FACTORY_FOR`` syntax and related parameters, that should be declared through ``class Meta``.
* doc: Document upgrade path for FACTORY_*.Raphaël Barrois2014-05-31
|
* Rename hidden/arg_parameters to exclude/inline_args.Raphaël Barrois2014-05-18
|
* Rename 'target' to 'model'.Raphaël Barrois2014-05-18
|
* Update docs for class Meta.Raphaël Barrois2014-05-18
|
* Add 'factory.debug' context manager.Raphaël Barrois2013-09-17
|
* Make ABSTRACT_FACTORY optional (Closes #74)Raphaël Barrois2013-08-13
| | | | | | | | It will be automatically set to True if neither the Factory subclass nor its parents define a FACTORY_FOR argument. It can also be set on a Factory subclass to prevent it from being called.
* Add Iterator.reset() (Closes #63).Raphaël Barrois2013-06-15
|
* Properly handle passed-in None in RelatedFactory (Closes #62).Raphaël Barrois2013-06-14
| | | | Thanks to @Dhekke for the help!
* Add Factory.reset_sequence.Raphaël Barrois2013-06-10
|
* Move DjangoModelFactory / MogoFactory to their own modules.Raphaël Barrois2013-06-09
|
* Add LazyStub.factory_parent (See #55).Raphaël Barrois2013-05-03
|
* declarations: Rename RelatedFactory.name (See #58).Raphaël Barrois2013-04-29
| | | | | | Use less conflict-prone factory_related_name. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* docs: add note to SubFactory/RelatedFactory.Raphaël Barrois2013-04-21
|
* Add Dict/List declarations (Closes #18).Raphaël Barrois2013-04-15
|
* Allow overriding the sequence counter.Raphaël Barrois2013-04-15
|
* Add Factory.FACTORY_HIDDEN_ARGS.Raphaël Barrois2013-04-02
| | | | | Fields listed in this class attributes will be removed from the kwargs dict passed to the associated class for building/creation.
* Remove extract_prefix from post-generation hooks.Raphaël Barrois2013-03-11
| | | | Magic abuse is bad.
* Remove CircularSubFactory.Raphaël Barrois2013-03-11
| | | | Replace CircularSubFactory('module', 'symbol') with SubFactory('module.symbol').
* Remove InfiniteIterator and infinite_iterator.Raphaël Barrois2013-03-11
| | | | Use Iterator/iterator instead.
* Doc: Add mission 'versionadded' tag.Raphaël Barrois2013-03-11
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* doc: Fix rst.Raphaël Barrois2013-03-11
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add FACTORY_CLASS kwarg to make_factory and friends.Raphaël Barrois2013-03-11
|
* Merge documentation for PostGenerationMethodCall.Chris Lasher2013-03-11
| | | | | | | | | | This merges in changes provided by gotgenes to the previous PostGeneration documentation to the new documentation provided by rbarrois. This documentation relates to the new functionality of overriding default arguments to declarations of PostGenerationMethodCall. Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Stop calling Foo.objects.create() when it doesn't break (Closes #23).Raphaël Barrois2013-03-05
| | | | | | | | | This will be properly fixed in v2.0.0; the current heuristic is: - If the user defined a custom _create method, use it - If he didn't, but the associated class has a objects attribute, use TheClass.objects.create(*args, **kwargs) - Otherwise, simply call TheClass(*args, **kwargs). Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* doc: Add m2m recipes (Closes #29).Raphaël Barrois2013-03-05
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Improve doc on post-generation hooks (Closes #36).Raphaël Barrois2013-03-05
| | | | | | This was the last missing bit from PR#36 by @gotgenes. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Cleanup argument extraction in PostGenMethod (See #36).Raphaël Barrois2013-03-05
| | | | | | | This provides a consistent behaviour for extracting arguments to a PostGenerationMethodCall. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add a 'after post_generation' hook to Factory.Raphaël Barrois2013-03-04
| | | | | | Use it in DjangoModelFactory to save objects again if a post_generation hook ran. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Allow symbol names in RelatedFactory (Closes #30).Raphaël Barrois2013-03-03
| | | | | | This works exactly as for SubFactory. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Update ChangeLog for 1.3.0Raphaël Barrois2013-03-03
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Improve Iterator and SubFactory declarations.Raphaël Barrois2013-03-03
| | | | | | | | | | | | * Iterator now cycles by default * Iterator can be provided with a custom getter * SubFactory accepts a factory import path as well Deprecates: * InfiniteIterator * CircularSubFactory Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Rewrite the whole documentation.Raphaël Barrois2013-03-03
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>