flatpages has no __str__()
|Reported by:||wam-django-ticket@…||Owned by:||adrian|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Apparently the admin interface now uses str() rather than repr() to display values to the end user. The contrib application only has a repr method defined on the FlatPages object, so when viewing the list of flat pages, through the admin interface, we only see the class name, which is not particularly useful.
It seems like if you were calling str() on the object then if str was defined it would get used, but if not, then repr() would be used as a fall back.
Finally, it looks like this change has also bitten the django website itself the navigation links on the right hand side of
* "Simple" generic views o django.views.generic.simple.direct_to_template o django.views.generic.simple.redirect_to * Date-based generic views o django.views.generic.date_based.archive_index o django.views.generic.date_based.archive_year [snipped for brevity]
I'm filing this ticket under 'core' since it spans beyond just the admin interface (as evidenced by the above URL)