示例#1
0
 def test_logging_of_aidant_conection(self):
     entry = Journal.log_connection(aidant=self.aidant_thierry)
     self.assertEqual(len(Journal.objects.all()), 3)
     self.assertEqual(entry.action, "connect_aidant")
     self.assertEqual(
         entry.initiator,
         "Thierry Martin - Commune de Vernon - [email protected]")
示例#2
0
def log_connection_on_login(sender, user: Aidant, request, **kwargs):
    Journal.log_connection(user)
示例#3
0
def on_login(sender, user, request, **kwargs):
    Journal.log_connection(user)