Apologies for the simple question. I’ve tried searching the django docs for an answer, but I haven’t been able to figure it out.
I have set up a couple classes, but in the admin area they are all coming up as ‘classname object’. I tried using the code here:
How do Django model fields work?
.. but I got an enormous page of errors.
I have an abstract class of people, and then child classes of specialized people. I’m trying to get them to be listed as self.name but I can’t for the life of me figure this out.
Thank you.
You should implement a
__unicode__method, like:In that point if you try to
printa Person object, it will use your__unicode__function.