def ping_external_urls_handler(sender, **kwargs): """Ping Externals URLS when an gbobject is saved""" gbobject = kwargs['instance'] if gbobject.is_visible and settings.SAVE_PING_EXTERNAL_URLS: from objectapp.ping import ExternalUrlsPinger ExternalUrlsPinger(gbobject)
def setUp(self): params = { 'title': 'My gbobject', 'content': 'My content', 'tags': 'objectapp, test', 'slug': 'my-gbobject' } self.gbobject = Gbobject.objects.create(**params) self.pinger = ExternalUrlsPinger(self.gbobject, start_now=False)