Révision a01d85be
Ajouté par Serghei Mihai il y a presque 10 ans
calebasse/agenda/forms.py | ||
---|---|---|
43 | 43 |
'start_datetime': forms.HiddenInput, |
44 | 44 |
} |
45 | 45 |
|
46 |
|
|
47 |
|
|
48 | 46 |
def __init__(self, instance, service=None, **kwargs): |
49 | 47 |
self.service = None |
50 | 48 |
super(NewAppointmentForm, self).__init__(instance=instance, **kwargs) |
... | ... | |
100 | 98 |
if commit: |
101 | 99 |
appointment.patient = patient |
102 | 100 |
appointment.save() |
101 |
get_request().record('new-eventwithact', |
|
102 |
'{obj_id} created by {user} from {ip}', |
|
103 |
obj_id=appointment.id) |
|
103 | 104 |
self.save_m2m() |
104 | 105 |
appointment.services = [self.service] |
105 | 106 |
|
... | ... | |
120 | 121 |
appointment.clean() |
121 | 122 |
if commit: |
122 | 123 |
appointment.save() |
124 |
get_request().record('update-eventwithact', |
|
125 |
'{obj_id} saved by {user} from {ip}', |
|
126 |
obj_id=appointment.id) |
|
123 | 127 |
self.save_m2m() |
124 | 128 |
appointment.services = [self.service] |
125 | 129 |
return appointment |
... | ... | |
205 | 209 |
event.clean() |
206 | 210 |
if commit: |
207 | 211 |
event.save() |
212 |
get_request().record('new-event', '{obj_id} created by {user} from {ip}', |
|
213 |
obj_id=event.id) |
|
208 | 214 |
event.services = [self.service] |
209 | 215 |
return event |
210 | 216 |
|
Formats disponibles : Unified diff
logging actions on models with django_journal
Closes #1988