def common_init(self): super(FormType, self).common_init() # self.__name__ = self.form_name # Location awareness # self.__parent__ = LocationHelper(self.plan) # Location awareness self.operational = False if hasattr(self, "klass"): self.op_setobject_type = setobject_type_registry.get(self.klass)
def post_order_traverse(self, mode): super(FormType, self).post_order_traverse(mode) if hasattr(self, "klass"): self.op_setobject_type = setobject_type_registry.get(self.klass) if self.op_setobject_type == None: raise Exception( "Type '%s' does not exist. Check p2_model " "table and/or ensure that class type exists in " "appropriate module and restart server." % (self.klass) )