 <p>I've got no idea how FactoryBoy works, but this strategy usually works for me when I need dynamic properties on fields in Django models:</p> <pre><code>def FooContainerFactory(factory.Factory): def __init__(self, count=20, *args, **kwargs): self.foos = factory.List([Foo() for _ in range(20)]) super(FooContainerFactory, self).__init__(*args, **kwargs) class Meta: model = FooContainerModel </code></pre>