I've got a Django model called
name = models.CharField(max_length=200, unique=True)
authors = Author.objects.filter(name__word__istartswith="Kn")
You can use
import re text = "Kn" text = re.escape(text) # make sure there are not regex specials authors = Author.objects.filter(name__iregex=r"(^|\s)%s" % text)
This isn't very efficient, but should work. On MySQL you can try taking advantage of full-text search features. On other DBs you'll need some extra tools to make an efficient full-text search (like django-haystack).