include user in change event

This commit is contained in:
j 2015-05-08 08:39:31 +02:00
parent f9ba4d1bf1
commit 562a506d68

View file

@ -35,7 +35,11 @@ def add_changelog(request, data, id=None):
c.changeid = id or data.get('id') c.changeid = id or data.get('id')
c.created = datetime.now() c.created = datetime.now()
c.save() c.save()
websocket.trigger_event('change', {'action': c.action, 'id': c.changeid}) websocket.trigger_event('change', {
'action': c.action,
'id': c.changeid,
'user': c.user,
})
class Log(models.Model): class Log(models.Model):