Exemple #1
0
 def topic(self):
     config = Config()
     config.ALLOWED_SOURCES = []
     ctx = Context(None, config, None)
     is_valid = loader.validate(
         ctx, 'http://www.google.com/logo.jpg'
     )
     return is_valid
Exemple #2
0
 def topic(self):
     config = Config()
     config.ALLOWED_SOURCES = ['s.glbimg.com']
     ctx = Context(None, config, None)
     is_valid = loader.validate(ctx, 'http://s.glbimg.com/logo.jpg')
     return is_valid