Thanks for the help Rajesh.  I had seen that quote before but it really
didnt click quite right until made painfully obvious.

Is there a cleaner way to acess parent model fields easily with the
list_display function itself?  The only way I have been able to do so
is like this:
###
class Log(models.Model):
        def gettaskdescription(self):
                return self.Task.description
        timestamp = models.DateTimeField('date completed')
        comments = models.TextField()
        active = models.BooleanField()
        task = models.ForeignKey(Task)
        taskdesc = gettaskdescription
        def __str__(self):
                return '%s' % self.timestamp
        class Admin:
                list_display =
('timestamp','comments','task','taskdesc')
###

Please forgive my noobness to DJango.  Hopefully I didnt completely
miss this being covered in the models examples somewhere.

 - DF


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to