(documents) add content field as an S3 object

The content field is a writable property on the model which is persisted
in object storage. We take advantage of the versioning, robustness and
scalability of S3.
This commit is contained in:
Samuel Paccoud - DINUM
2024-04-06 09:09:46 +02:00
committed by Anthony LC
parent 4956beb040
commit 8e262da8f5
11 changed files with 164 additions and 44 deletions

View File

@@ -35,6 +35,7 @@ class DocumentFactory(factory.django.DjangoModelFactory):
title = factory.Sequence(lambda n: f"document{n}")
is_public = factory.Faker("boolean")
content = factory.LazyFunction(lambda: {"foo": fake.word()})
@factory.post_generation
def users(self, create, extracted, **kwargs):