You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in an interactive shell/debugger/traceback you don't get a very good representation of the model instances:
eg. <chargebee.models.customer.Customer at 0x7ff7f9fb0e48>
Would be helpful to make it reference the Chargebee IDs by implementing Model.__repr__()
eg. <Customer: ZEw32jZRMQ0bB21A9t>
Implementation idea:
Assume Model.fields[0] is the key to use for representing the instance.
For most models this will be id (or entity_id/cn_id/txn_id/etc), or could be by simply re-ordering the fields list
For things like addresses without a natural key it could be a zip code? Or alternatively subclass those from an AddressModelMixin class which implements __repr__() by merging a few fields together (eg. return " ".join([self.city or '', self.zip or '', self.country or '']))
The text was updated successfully, but these errors were encountered:
Currently in an interactive shell/debugger/traceback you don't get a very good representation of the model instances:
eg.
<chargebee.models.customer.Customer at 0x7ff7f9fb0e48>
Would be helpful to make it reference the Chargebee IDs by implementing
Model.__repr__()
eg.
<Customer: ZEw32jZRMQ0bB21A9t>
Implementation idea:
Model.fields[0]
is the key to use for representing the instance.id
(orentity_id
/cn_id
/txn_id
/etc), or could be by simply re-ordering thefields
listAddressModelMixin
class which implements__repr__()
by merging a few fields together (eg.return " ".join([self.city or '', self.zip or '', self.country or ''])
)The text was updated successfully, but these errors were encountered: