def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def poll(cls, context):
        userpref = context.user_preferences
        return (userpref.active_section == 'INTERFACE')