summaryrefslogtreecommitdiff
path: root/docs/examples.rst
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2016-05-11 09:49:51 +0100
committerChristopher Baines <mail@cbaines.net>2016-05-11 09:49:51 +0100
commitd54b452452a04f8109ef8dc48c9b46d1cb99f476 (patch)
treea31e97328932c485d80e3be808c9e3572d955c39 /docs/examples.rst
parent36ef8928c06a4bba5249442cd832a73ece1570c3 (diff)
parentf1ed74e06dfb6851bc691ebfd8135c875154ad50 (diff)
downloadfactory-boy-d54b452452a04f8109ef8dc48c9b46d1cb99f476.tar
factory-boy-d54b452452a04f8109ef8dc48c9b46d1cb99f476.tar.gz
Merge tag 'v2.7.0' into debian/unstable
Release of factory_boy 2.7.0
Diffstat (limited to 'docs/examples.rst')
-rw-r--r--docs/examples.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/examples.rst b/docs/examples.rst
index e7f6057..6f26b7e 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -49,6 +49,7 @@ And now, we'll define the related factories:
.. code-block:: python
+ import datetime
import factory
import random
@@ -61,6 +62,7 @@ And now, we'll define the related factories:
username = factory.Sequence(lambda n: 'john%s' % n)
email = factory.LazyAttribute(lambda o: '%s@example.org' % o.username)
+ date_joined = factory.LazyFunction(datetime.datetime.now)
class ProfileFactory(factory.Factory):