You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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'sPage
model itself does to output thetitle
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?The text was updated successfully, but these errors were encountered: