def __getattr__(self, name): try: return getattr(self.wrapped, name) except AttributeError: try: path = __package__ + "." + name # Create the topic using its models return topic_models(path) except Topic.DoesNotExist: # Raise a basic attribute error raise AttributeError("The attribute '%s' doesn't exist." % name)
def reload(self): from app.detective.register import topic_models # Register the topic's models again topic_models(self.get_module().__name__, force=True)
def reload(self): from app.detective.register import topic_models # Register the topic's models again return topic_models(self.get_module_path(), force=True)