Update article date : Date des articles modifiés - #48
Merged
Conversation
…at`. Each update now records an UTC timestamp, exposed through the domain, adapters and API, formatted to full Europe/Paris local time in responses. Detail and list pages display an “edited at …” indicator, CSS adds the edited‑line style, and all affected tests validate the new field end‑to‑end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Chaque mise à jour d'article enregistre désormais un timestamp
article_edited_at(UTC) dans la base de données. Les pages de détail et de liste affichent un indicateur "edited at …" formaté en Europe/Paris. Le nom de la colonne DB (article_edited_at) est aligné sur les noms de variables dans le domaine, les DTO et les adaptateurs (conventionarticle_partout).Modifications
Base de données
article_edited_at TIMESTAMPsurarticlesDomaine
src/application/domain/article.py— Nouveau paramètrearticle_edited_atdansArticle.__init__()Services
article_service.py—update_article()définitarticle_article_edited_at = datetime.now(UTC)avant la sauvegardeAdaptateurs de persistance
sqlalchemy_article_model.py— Nouvelle colonne mappéesqlalchemy_article_adapter.py— Passage dearticle_edited_atdans les chemins UPDATE et INSERTarticle_record.py— Nouveau champ + transmission àto_domain()DTO de réponse
article_response.py— Nouveaux champsarticle_edited_atetarticle_edited_at_formatted, méthode statique_to_local_full()pour le formatage complet (mois jour, année at HH:MM), docstrings. Suppression de la fonction morte_blocks_to_plain_text()Adaptateur Flask
flask_article_adapter.py— Exposition de"article_edited_at"dans l'API JSONFrontend
article_detail.html— Indicateur "edited at …" après la date de publicationarticle_list.html— Même indicateur dans les métadonnées de chaque articlearticle.css— Style.article-edited-line(couleuron-surface-variant)Tests
test_article_service.py— Vérifie queupdate_article()set le timestamptest_article_response.py— Formattage Europe/Paris avec et sansedited_attest_flask_article_adapter.py— Présence de la clé"article_edited_at"dans la réponse JSONtest_article_record.py— Mock mis à jour avec le nouveau champtest_workflow_integration.py— Round-trip complet : création → édition → vérification en base