Has a feature like this ever been considered?
If a model has no __unicode__, __str__ or __repr__ representation, then maybe it could devise a string representation by collecting fields which have this value set to True.
Example:
Without the feature:
class Person(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
>>> person = Person(first_name='Ben', last_name='Friedland')
>>> print person
<Person: Person object> # fairly useless object representation
This feature would work something like:
class Person(models.Model):
first_name = models.CharField(max_length=50, repr_output=True)
last_name = models.CharField(max_length=50, repr_output=True)
>>> person = Person(first_name='Ben', last_name='Friedland')
>>> print person
<Person: first_name='Ben', last_name='Friedland'> # includes fields specified via repr_output=True
If this would be useful I'd be happy to formally create an issue and even implement the feature.
Thanks!
Ben Friedland