Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default model repr should omit id when other unique columns are present #29

Open
EliAndrewC opened this issue Sep 14, 2016 · 0 comments
Labels

Comments

@EliAndrewC
Copy link
Contributor

Moved here from the original (now-private) issue tracker.

SQLAlchemy models in Sideboard get a default repr which by default displays all unique columns. So when going through the Sideboard tutorial, you'll see something that looks like

[<Website id='9d4eb9f2-3b92-4ddf-9b22-999b2063d98b' url=u'http://hastheworldendedyet.com'>, <Website id='cc06e57b-eb3d-484c-908c-bb4f97b81306' url=u'http://hasthelargehadroncolliderdestroyedtheworldyet.com'>]

This would be far more legible if it just read

[<Website url=u'http://hastheworldendedyet.com'>, <Website url=u'http://hasthelargehadroncolliderdestroyedtheworldyet.com'>]

My opinion is that we probably don't want the id to be present in the default repr when there are already other unique columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant