Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def reload(self):
     from app.detective.register import topic_models
     # Register the topic's models again
     topic_models(self.get_module().__name__, force=True)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)