def store(self, message): ''' Store messages flagging a business format of message: { 'business_id': ---- 'drug': --- } Message should be a dictionary object ''' flag = Flag(business_id=message['business_id'], drug_name=message.get('drug_name', 'Unspecified', date=datetime.utcnow())) flag.save()