def has_index(self, column):
        if column.primary_key or column.foreign_keys:
            return True
        table = column.table
        for index in table.indexes:
            if len(index.columns) == 1 and column.name in index.columns:
                return True
        return False
Whether or not given column has an index.
dataset/ETHPy150Open kvesteri/wtforms-alchemy/wtforms_alchemy/generator.py/FormGenerator.has_index