def UniversalForeignKey(to, **kwargs):
return models.ForeignKey(
to=to,
null=True,
verbose_name='test',
on_delete=models.CASCADE,
**kwargs
)
class Test1(models.Model):
test = UniversalForeignKey('app_model')
def check_username_and_description(self, status):
return not any(
x in " ".join([status.user.screen_name, status.user.description]).lower()
for x in BOT_SETTINGS['banned_username_userinfo_words']
)
def check_username_and_description(self, status):
return not bool(
set((status.user.screen_name + " " + status.user.description).lower()).intersection(
set(BOT_SETTINGS['banned_username_userinfo_words'])
)
)