Querying performance

2017-03-23 Thread dsfqce cwfe
Is quering Provider model significantly less efficient using this pattern? class Provider(models.Model): def __new__(cls, url, *args, **kwargs): if 'google' in url: return object.__new__(Google) elif 'bing' in url: return object.__new__(Bing) url =

Querying performance

2017-03-23 Thread dsfqce cwfe
Is querying Provider model significantly less efficient using this pattern? class Provider(models.Model): def __new__(cls, url, *args, **kwargs): if 'google' in url: return object.__new__(Ekino) elif 'bing' in url: print('gowno') url = models.CharFi