-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(documentation): partie 2, ajout de modèles abstraits pour réduire l'adhérence à machina
#784
Conversation
b21a0fe
to
0be1eca
Compare
documentation
machina
0be1eca
to
a1ce345
Compare
b4a0c4f
to
eef8d87
Compare
ea55cd7
to
a6a67d6
Compare
a6a67d6
to
9e3e12c
Compare
migrations.AlterField( | ||
model_name="partner", | ||
name="image", | ||
field=models.ImageField( | ||
blank=True, | ||
null=True, | ||
storage=storages.backends.s3.S3Storage(bucket_name="private-bucket", file_overwrite=False), | ||
upload_to="", | ||
validators=[lacommunaute.utils.validators.validate_image_size], | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="partner", | ||
name="short_description", | ||
field=models.CharField(default="to be updated", max_length=400, verbose_name="Short Description"), | ||
preserve_default=False, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a les partenaires existantes dans la base de données ? Il y aura possiblement des problèmes avec les deux changements :
short_description
obligatoire- les images existantes seraient stockées dans le bucket sous
logos/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bon point !
Effectivement, je n'ai pas trouvé comment modifier le bucket_name
du champ ImageField
herité de Publication
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pour les partenaires existants, ils ont tous un short_description
complété.
eef8d87
to
7fca7f0
Compare
9e3e12c
to
bacdf13
Compare
7fca7f0
to
cbfb8a6
Compare
bacdf13
to
020dbe6
Compare
ISSUE #765
Description
🎸 Ajout de modèles abstraits dans
utils
DatedModel
, pour réduire les adhérences avecmachina
AbstractPublication
modèle de contenus éditoriaux : nom, slug, short_description, description en markdown, image) dansutils
. Sera réutilisé dans l'appdocumentation
et l'apppartner
Type de changement
Technique
Points d'attention
🦺 SUITE PR #783
🦺 maintien du nom des variables
created
etupdated
dansDatedModel
pour simplifier la transposition🦺 réutilisation des modèles abstraits