EliAndrewC / sideboard

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

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

Closed EliAndrewC closed 8 years ago

EliAndrewC commented 10 years ago

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'>]

In my opinion this would look way nicer 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.

EliAndrewC commented 8 years ago

Moved to https://github.com/magfest/sideboard/issues/29