Bug #57108
django 2.2 / JSONEditor : Exception Value: render() got an unexpected keyword argument 'renderer'
Début:
20 septembre 2021
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
parce que renderer doit faire partie de la signature de render() depuis Django 2.1
Fichiers
Révisions associées
dj22: use mark_safe instead of allow_tags in admin (#57108)
Historique
Mis à jour par Thomas Noël il y a plus de 2 ans
- Fichier 0001-dj22-add-renderer-in-JSONEditor.render-signature-571.patch 0001-dj22-add-renderer-in-JSONEditor.render-signature-571.patch ajouté
- Statut changé de En cours à Solution proposée
- Patch proposed changé de Non à Oui
(test: c'est posé en hotfix en prod)
Mis à jour par Thomas Noël il y a plus de 2 ans
- Fichier Capture d’écran de 2021-09-20 16-36-15.png Capture d’écran de 2021-09-20 16-36-15.png ajouté
- Statut changé de Solution proposée à En cours
Ca ne marche pas, on se retrouve avec du HTML dans le textarea. Je suis aux limites de mes compétences ici :)
Mis à jour par Thomas Noël il y a plus de 2 ans
Ca vient sans doute de Django 2.0 et « Support for the allow_tags attribute on ModelAdmin methods will be removed. » car c'est ce qui est utilisé pour afficher la description des fragments dans JobAdmin :
class JobAdmin(JSONEditorMixin, admin.ModelAdmin): ... readonly_fields = ['_description'] ... def _description(self, instance): return instance.description _description.allow_tags = True
Mis à jour par Thomas Noël il y a plus de 2 ans
- Fichier 0002-dj22-use-mark_safe-instead-of-allow_tags-in-admin-57.patch 0002-dj22-use-mark_safe-instead-of-allow_tags-in-admin-57.patch ajouté
- Fichier 0001-dj22-add-renderer-in-JSONEditor.render-signature-571.patch 0001-dj22-add-renderer-in-JSONEditor.render-signature-571.patch ajouté
- Statut changé de En cours à Solution proposée
Voici donc
Mis à jour par Benjamin Dauvergne il y a plus de 2 ans
- Statut changé de Solution proposée à Solution validée
Go.
Mis à jour par Thomas Noël il y a plus de 2 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit e3bf286f637b420b2e8ef5eebb187f437ebcf02a Author: Thomas NOEL <tnoel@entrouvert.com> Date: Mon Sep 20 16:58:44 2021 +0200 dj22: use mark_safe instead of allow_tags in admin (#57108) commit 05f31e6e31fe1d454e0fc54e8dc45b0efef3fb9b Author: Thomas NOEL <tnoel@entrouvert.com> Date: Mon Sep 20 16:58:16 2021 +0200 dj22: add renderer in JSONEditor.render signature (#57108)
dj22: add renderer in JSONEditor.render signature (#57108)