title: In django, can one use F() objects to see if a constant contains strings from a field?
body: <p>All,<br>
     I'm trying to basically do keyword notifications, so whenever an object with a name is created, anyone who wants to be notified of any of the words in this name will be. <br>
  e.g.<br></p>
  
  <pre>
  Records:
     keyword: Hello
     keyword: World
  
  New Name: "Hello World"
  
  Returns both records
  </pre>
  
  <p><br>
  I've created a query that correctly works for this in sqlite, and I know how to translate it across databases.  </p>
  
  <pre><code>SELECT * FROM table t
  WHERE "a constant string" LIKE "%" || t.field || "%";
  </code></pre>
  
  <p>I've determined that within django, one can use <a href="https://docs.djangoproject.com/en/1.2/topics/db/queries/#field-lookups" rel="nofollow">F() objects</a> to compare one field to another field, like so:</p>
  
  <pre><code>Entry.objects.filter(n_comments__gt=F('n_pingbacks'))
  </code></pre>
  
  <p>Now anyone know how to replace the first field with a constant string?  Like so:</p>
  
  <pre><code>Entry.objects.filter("constant string"__icontains=F('n_pingbacks'))
  </code></pre>
  
  <p>Or am  I going about this backwards?</p>