tolomea / django-data-browser

Django app for user friendly querying of Django models
BSD 3-Clause "New" or "Revised" License
350 stars 28 forks source link

Ability to rename (or alias) columns #74

Open j-osephlong opened 3 months ago

j-osephlong commented 3 months ago

It would be nice if we could rename / alias columns to be more readable at a glance, especially when sharing the results of it via the sharable link or google sheets import.

tolomea commented 3 months ago

At what sort of scope would you want that? just a thing you do in the FE? persisted for the user? or something on the model/admin that applies to everyone always?

It's not the same but FYI it does respect verbose_name on the model fields and model meta.

j-osephlong commented 2 months ago

Say I have a saved query on the data-browser app. Maybe it has an aggregation of some field that, for one reason or another, isn't immediately clear to a layman what it represents (especially to someone viewing it as a csv public link). It would be awesome if in the react app, I could right click a column or pivot header, and set an alias for the that header that better expresses what it means. This would save onto the model, maybe in a textfield of the format "{field}={alias},{field2}={alias2}" (I'm just spitballing here).

This would then apply to anyone viewing the query through the react app or a public view.

tolomea commented 2 months ago

Thank you, having the specific usecase like this is very helpful