title: Django Haystack : search for a term with and without accents
body: <p>I'm implementing a search system onto my django project, using django haystack. The problem is that some fields in my models have some french accents, and I would like to find the entries which contents the query with and without accents.</p>
  
  <p>I think the best Idea is to create a SearchIndex with both the fields with the accents, and the same field without the accents.</p>
  
  <p>Any idea or hint on this ?  </p>
  
  <p>Here is some code</p>
  
  <p>Imagine the following models :</p>
  
  <pre><code>Cars(models.Model):
      name = models.CharField()
  </code></pre>
  
  <p>and the following Haystack Index:</p>
  
  <pre><code>Cars(indexes.SearchIndex):
      name = indexes.CharField(model_attr='name')
      cleaned_name = indexes.CharField(model_attr='name')
  
      def prepare_cleaned_name(self, object):
          return strip_accents(object.name)
  </code></pre>
  
  <p>now, in my index template, I put the both fields :</p>
  
  <pre><code>{{ object.cleaned_name }}
  {{ object.name }}
  </code></pre>
  
  <p>So, thats some pseudo code, I don't know if it works, but if you have any idea on this, let me know !</p>