From 0e8b5bea483376467b99c4a8c47f1710d65eabdb Mon Sep 17 00:00:00 2001 From: Calum Mackervoy Date: Sun, 19 Jul 2026 11:14:26 +0200 Subject: [PATCH] doc: Fix FuzzyDate examples in reference.rst Add start_date (required parameter) to the example uses of FuzzyDate --- docs/reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index 2122b9f7..2cd3c832 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -408,7 +408,7 @@ Some factories only need little data: class Params: duration = 'short' # Or 'long' - start_date = factory.fuzzy.FuzzyDate() + start_date = factory.fuzzy.FuzzyDate(datetime.date.today()) end_date = factory.LazyAttribute( lambda o: o.start_date + datetime.timedelta(days=2 if o.duration == 'short' else 7) ) @@ -1310,7 +1310,7 @@ That declaration takes a single argument, a dot-delimited path to the attribute class Meta: model = User - birthdate = factory.fuzzy.FuzzyDate() + birthdate = factory.fuzzy.FuzzyDate(datetime.date.today()) birthmonth = factory.SelfAttribute('birthdate.month') .. code-block:: pycon