python:grok_and_zope.app.undo
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| python:grok_and_zope.app.undo [2012/09/12 12:02] – jenad | python:grok_and_zope.app.undo [2017/11/15 08:09] (aktuell) – gelöscht jenad | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | |||
| - | ====== What: undo transactions in grok ====== | ||
| - | |||
| - | |||
| - | Problem: zope.app.undo does not work with ZODB-3.10 and grok-1.10.3 | ||
| - | |||
| - | |||
| - | Solutions (all these are workarounds, | ||
| - | |||
| - | 1. MenuItem Error | ||
| - | |||
| - | as result of adding zope.app.undo to setup.py following error appears: | ||
| - | |||
| - | ConfigurationError: | ||
| - | |||
| - | |||
| - | edit | ||
| - | |||
| - | zope.app.undo-3.5.0-py2.7.egg/ | ||
| - | | ||
| - | and delete the menuItem-Sections; | ||
| - | |||
| - | 2. ZODB has changed the api | ||
| - | |||
| - | Error after submit the transaction ID's: | ||
| - | |||
| - | " | ||
| - | |||
| - | |||
| - | The undo API has changed with ZODB 3.10. As noted in the changelog: | ||
| - | | ||
| - | "The API for undoing multiple transactions has changed. To undo | ||
| - | multiple transactions in a single transaction, | ||
| - | transaction identifiers to a database' | ||
| - | database' | ||
| - | raises an exception." | ||
| - | | ||
| - | Your code calls undo multiple times, and needs to be changed accordingly. | ||
| - | |||
| - | |||
| - | edit in | ||
| - | |||
| - | zope.app.undo-3.5.0-py2.7.egg/ | ||
| - | | ||
| - | the last def: | ||
| - | |||
| - | |||
| - | old: | ||
| - | <code python> | ||
| - | def _undo(self, ids): | ||
| - | |||
| - | for id in ids: | ||
| - | self.__db.undo(id) | ||
| - | transaction.get().setExtendedInfo(' | ||
| - | </ | ||
| - | |||
| - | new: | ||
| - | |||
| - | <code python> | ||
| - | def _undo(self, ids): | ||
| - | |||
| - | self.__db.undoMultiple(ids) | ||
| - | transaction.get().setExtendedInfo(' | ||
| - | </ | ||
python/grok_and_zope.app.undo.1347451359.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
