How to inject types for standalone zodbbrowser?

Bug #1404561 reported by Andreas Balogh
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZODB Browser

Bug Description

I am using the standalone zodbbrowser 0.11.1 with a ZODB3 database. I can access the database fine but when I insert objects of unknown type into the ZODB the browser only displays:

data: {u'account-1': <persistent broken __main__.Account instance '\x00\x00\x00\x00\x00\x00\x00\x01'>,
            u'account-2': <persistent broken __main__.Account instance '\x00\x00\x00\x00\x00\x00\x00\x01'>

I'd like to see a formatted printout from __repr__ (or __str__) instead. The short user guide on pypi at Help! Broken objects everywhere recommends to make sure your application objects are importable from the Python path. But I don't know how.

How do I make the Account class (from the tutorial):

class Account(Persistent):
    def __str__(self):

known to zodbbrowser in standalone mode so that the persistent broken type are replaced with a __str__ representation of the object instance?

NB: cross posted

Revision history for this message
Andreas Balogh (baloand) wrote :

I'veput this to github. Don't know how to delete the bug here...

Changed in zodbbrowser:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.