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

Move away from assuming models have a title field #141

Open
ababic opened this issue Jan 23, 2023 · 0 comments
Open

Move away from assuming models have a title field #141

ababic opened this issue Jan 23, 2023 · 0 comments

Comments

@ababic
Copy link

ababic commented Jan 23, 2023

There's an existing and well-used Django convention for controlling the string representation of model instance, and that is to override the __str__() method (something Wagtail's Page model itself does to output the title field value).

There's also a convention for pages in Wagtail for changing the string representation in various parts of the Wagtail admin, which is to override the get_admin_display_title()

Wouldn't it make sense to use either of these by default, rather than assuming models have a title field, and forcing users to specify otherwise when it does not?

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