Show the last action date and user on the application list

This commit is contained in:
2011-01-14 10:45:45 +00:00
parent 74bd5ef90c
commit ef977c0fe6
2 changed files with 11 additions and 1 deletions

View File

@@ -77,6 +77,12 @@ class Application(models.Model):
return blacklist
@property
def last_action(self):
if self.audit_set.count():
return self.audit_set.all().order_by('-date')[0]
return None
def save(self, *args, **kwargs):
user = None