Project

General

Profile

« Previous | Next » 

Revision 8e6a3c86

Added by Serghei Mihai over 9 years ago

logging actions on models improved using post_save and pre_delete signals

View differences:

calebasse/personnes/models.py
51 51
        else:
52 52
            self.display_name = self.last_name.upper()
53 53
        super(People, self).save(**kwargs)
54
        get_request().record('people-save', '{obj_id} saved by {user} from {ip}', obj_id=self.id)
55 54

  
56 55
    def __unicode__(self):
57 56
        return self.display_name
......
96 95
        if not self.initials:
97 96
            self.initials = self.get_initials()
98 97
        super(Worker, self).save(**kwargs)
99
        get_request().record('worker-save', '{obj_id} saved by {user} from {ip}', obj_id=self.id)
100 98

  
101 99
    def is_active(self):
102 100
        return self.enabled

Also available in: Unified diff