'Publish realtime that the current document is modified'

def notify_update(self):

    frappe.publish_realtime(u'doc_update', {u'modified': self.modified, u'doctype': self.doctype, u'name': self.name}, doctype=self.doctype, docname=self.name, after_commit=True)
    if ((not self.meta.get(u'read_only')) and (not self.meta.get(u'issingle')) and (not self.meta.get(u'istable'))):
        frappe.publish_realtime(u'list_update', {u'doctype': self.doctype}, after_commit=True)
