Hi,
     How do I implement a substring query?
     Please find the example below.
>From Django Documentation:
  Entry.objects.get(headline__icontains='Lennon')
  => This matches the headline 'Today lennon honoured'

My query is the opposite:
   I have the string 'Lennon' inside my DB, and I have to match 'Today
Lennon honoured'
Say:
Entry.objects.get(headline__isubstring='Today Lennon Honoured')
should return headline 'Lennon'.

    I checked iregex too, but I cannot seem to solve it myself. If
somebody has solved this, could you please help me out.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to