  
  from django.contrib.postgres import forms
  from django.contrib.postgres.fields.array import ArrayField
  from django.core import exceptions
  from django.db.models import Field, Lookup, Transform, TextField
  from django.utils import six
  from django.utils.translation import ugettext_lazy as _
  
  
  __all__ = ['HStoreField']
 
</s> remove from django.contrib.postgres import forms
 </s> add from django.contrib.postgres import forms, lookups </s> remove from django.db.models import Transform
 </s> add from django.db.models import Lookup, Transform </s> remove class Unaccent(Transform):
 </s> add class PostgresSimpleLookup(Lookup):
    def as_sql(self, qn, connection):
        lhs, lhs_params = self.process_lhs(qn, connection)
        rhs, rhs_params = self.process_rhs(qn, connection)
        params = lhs_params + rhs_params
        return '%s %s %s' % (lhs, self.operator, rhs), params


class FunctionTransform(Transform):
    def as_sql(self, qn, connection):
        lhs, params = qn.compile(self.lhs)
        return "%s(%s)" % (self.function, lhs), params


class DataContains(PostgresSimpleLookup):
    lookup_name = 'contains'
    operator = '@>'


class ContainedBy(PostgresSimpleLookup):
    lookup_name = 'contained_by'
    operator = '<@'


class Overlap(PostgresSimpleLookup):
    lookup_name = 'overlap'
    operator = '&&'


class Unaccent(FunctionTransform): </s> remove class IContains(PatternLookup):
 </s> add class IContains(Contains):
from django.db.models import Field, Transform, TextField
  
  from django.contrib.postgres import forms
  from django.contrib.postgres.fields.array import ArrayField
  from django.core import exceptions
from django.db.models import Field, Transform, TextField
  from django.utils import six
  from django.utils.translation import ugettext_lazy as _
  
  
  __all__ = ['HStoreField']
keep keep keep keep replace keep keep keep keep keep
 Move % addition to lookups, refactor postgres lookups.

These refactorings making overriding some text based lookup names on
other fields (specifically `contains`) much cleaner. It also removes a
bunch of duplication in the contrib.postgres lookups. 
django/contrib/postgres/fields/hstore.py