Skip to content
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

fix(post): simplification du sujet des Post #748

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

vincentporte
Copy link
Contributor

@vincentporte vincentporte commented Aug 12, 2024

Description

🎸 Les Post de réponse d'un Topic (à partir du 2e, jusqu'au dernier), conservent le même sujet que le Topic. Le TOPIC_ANSWER_SUBJECT_PREFIX est supprimé pour améliorer la qualité des emails de notification.
🎸 Optimisation & simplification de TopicForm et PostForm

Type de changement

🎢 Nouvelle fonctionnalité (changement non cassant qui ajoute une fonctionnalité).
🚧 technique

Points d'attention

🦺 Suppression du code dupliqué dans PostForm et dans TopicForm avec le code de django-machina, et ajout des tests correspondants
🦺 Simplification de la méthode init de TopicForm, et ajout des tests correspondants

@vincentporte vincentporte changed the title fix(post): suppression du prefix Re: fix(post): simplification du sujet des Post Aug 12, 2024
@vincentporte vincentporte added the python Pull requests that update Python code label Aug 12, 2024
@vincentporte vincentporte marked this pull request as ready for review August 12, 2024 13:38
Comment on lines -48 to -49
if self.user.is_anonymous:
post.username = self.cleaned_data["username"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je vois que il y a un test qui confirme on peut enlever ce code

assert set(response.context_data["post_form"].fields["tags"].initial) == set(Tag.objects.all())


class TestPostForm:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beaux tests :)

@vincentporte vincentporte merged commit 3c2a5a0 into master Aug 12, 2024
10 checks passed
@vincentporte vincentporte deleted the vp/refactor_post_and_topic_forms branch August 12, 2024 14:10
vincentporte pushed a commit that referenced this pull request Sep 9, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.13.0](v2.12.0...v2.13.0)
(2024-09-05)


### Features

* **event:** amélioration de l'admin
([#753](#753))
([ca56d83](ca56d83))
* **forum:** retrait des communautés privées
([#768](#768))
([1c120e3](1c120e3))
* **partner:** ajout des pages partenaires
([#757](#757))
([33fd1c6](33fd1c6))
* **partner:** améliorations post déploiement
([#763](#763))
([09a865f](09a865f))
* **partner:** lien avec les fiches pratiques
([#761](#761))
([60bb2ee](60bb2ee))
* **partner:** referencer les fiches partenaires dans sitemap.xml
([#759](#759))
([91bea96](91bea96))
* **tags:** afficher les filtres sur les tags
([#752](#752))
([7a10488](7a10488))
* **tags:** afficher les Tags dans la liste des fiches pratiques d'une
categorie
([#751](#751))
([ed005b7](ed005b7))
* **tags:** ajouter des étiquettes à un forum
([#746](#746))
([7f435bb](7f435bb))
* **tags:** ajouter une étiquette inexistante à un sujet
([#744](#744))
([b82ea73](b82ea73))
* **tags:** filtrer les `forum` enfants à partir des tags
([#750](#750))
([eb6683a](eb6683a))


### Bug Fixes

* **forum_conversation:** Résolution des erreurs de tests sur les
contenus des messages
([#754](#754))
([8e0f35d](8e0f35d))
* **partner:** mise en forme des logos de la vue en liste
([#764](#764))
([7a84319](7a84319))
* **post:** simplification du sujet des `Post`
([#748](#748))
([3c2a5a0](3c2a5a0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants