Bug #31092
Depuis la vue OU liste impossible de basculer sur l'édition d'une OU (django-tables2)
0%
Description
Avec django-tables 1.21.2 qui vient après un pulik-devinst, marche pas. Marche avec 1.14.2 qu'on est censé avoir sur le SAAS (#31091).
Dans authentic2/manager/templates/authentic2/manager/ous.html :
{% block main %} {% with row_link=1 %} {% render_table table "authentic2/manager/table.html" %} {% endwith %} {% include "authentic2/manager/export_include.html" with export_view_name="a2-manager-ou-export" %} {% endblock %}
Puis dans src/authentic2/manager/templates/authentic2/manager/table.html :
{% block table.tbody.row %} <tr {% if row_link %} {% if popup_edit %} rel="popup" {% endif %} {% if url_name %} data-url="{% url url_name pk=row.record.pk %}" {% else %} data-url="{{ row.record.pk }}/" {% endif %} {% endif %} data-pk="{{ row.record.id }}"
row_link
pas dans le contexte du deuxième template en 1.21.1, pas de data-url
.
Fichiers
Révisions associées
Historique
Mis à jour par Emmanuel Cazenave il y a environ 5 ans
Ça casse entre 1.20 et 1.21 :
+## 1.21.0 (2018-03-12) + - Add new method `paginated_rows` to `Table` to replace fallback to non-paginated rows in templates. + - Prevent mutation of the template context `{% render_table %}` is called from (fixes [#547](https://github.com/jieter/django-tables2/issues/547)
https://github.com/jieter/django-tables2/pull/550/commits/1a869f78c58c301003e0dfcd8577c4b111813595
Mis à jour par Emmanuel Cazenave il y a environ 5 ans
- Fichier 0001-access-context-through-table-object-31092.patch 0001-access-context-through-table-object-31092.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Assigné à mis à Emmanuel Cazenave
- Patch proposed changé de Non à Oui
Le contexte est accessible sans trifouillage à travers l'objet table.
Testé en 1.2.0, 1.4.X, 1.21.2 et ok.
Mis à jour par Frédéric Péters il y a environ 5 ans
En jessie on est encore sur une version 1.0.4 (mais une version 1.2.0 est disponible en backport, si utile).
Mis à jour par Emmanuel Cazenave il y a environ 5 ans
Pas pu tester en 1.0.4 parce que migration and co mais lecture du code ça me semble ok.
Mis à jour par Emmanuel Cazenave il y a environ 5 ans
- Statut changé de Solution proposée à Résolu (à déployer)
commit 2741961ead7ef65a8e4d98e18d063dcaaf99de02 Author: Emmanuel Cazenave <ecazenave@entrouvert.com> Date: Tue Mar 5 13:31:32 2019 +0100 access context through table object (#31092)
Mis à jour par Frédéric Péters il y a environ 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
access context through table object (#31092)