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

[idea] : Adding kw/arg 'display_model_col' to ChainedForeignKey et al. #343

Open
pareshpandit opened this issue Jun 10, 2022 · 0 comments
Open

Comments

@pareshpandit
Copy link

Hello folks!

First of all, thank you all so much for this amazing project - simple does it! :)

From my recent experience (or lack thereof), I felt the need to call a particular column from a model when loading it as a related/dependent dropdown in a form, using ChainedForeignKey.

Basically, if we could have an kw/arg that shall tell dictate that the form rendering use a column named so and so, when displaying the dropdown on the frontend, for a particular field (from its model table).

For example, it presently defaults to the 'name' column of a Model, I have observed. However, I would like to take it to the 'name_ascii' column of my tables.

This is because, in my DB tables, the name column contains "child, parent, grandparent" kind of entry in a three-tiered chain. Now, This creates repetition on the form, and of course, in its entries too. Thus, I would like to control that the singular name (self name only) column is picked for display, and thence posting.

I hope that you also find this worth implementing, and that we might have it available sometime soon. Have a nice day! :)

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

No branches or pull requests

1 participant