Jan Rademaker wrote:

What is save to use __repr__ ?

I've found out that I shoud use self.get_someForeignKey().someThing()
instead of self.someForeignKey.someThing(), but what about date fields
and such?

Because, when I use self.someDateField in __repr__ django crashes the
moment _add_ a new object (using admin).

The field is declard as:
datum = meta.DateTimeField(auto_now_add=True)
I suppose you've hit the bug described in http://code.djangoproject.com/ticket/555
There is a workaround described in that ticket also... Hope this helps.

Reply via email to