Best Practices of Plone Development
Best Practices of Plone Development
Best Practices of Plone Development
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
1.9 Debugging 1 BEST PRACTICES FOR PLONE DEVELOPMENT<br />
1.9.13 Transactions<br />
• Automatically discarded at end <strong>of</strong> session<br />
• Discard now:<br />
get_transaction().abort()<br />
• Commit now:<br />
get_transaction().commit()<br />
1.9.14 Synchronizing Transaction<br />
• Sync your transaction to the most up-to-date:<br />
app._p_jar.sync()<br />
1.9.15 Limitations <strong>of</strong> ZODB Shell<br />
• Not a real request<br />
– Missing REQUEST, RESPONSE, user, etc.<br />
• Not really a user<br />
1.9.16 Testing a Request<br />
• Real request through ZPublisher:<br />
import Zope<br />
Zope.debug(’/path/to/object’)<br />
• Returns output<br />
• Happens in real, separate transaction<br />
45