2009/3/3 Daniel Roseman
>
> On Mar 3, 9:50 am, burcu hamamcıoğlu wrote:
> > I wrote a query like : applications =
> > Application.objects.filter(name__contains=searchText)
> > I want to get the applications filtered by searchText. If the app. name
> is
> > "Guitar" and my serachText is "guitar",
On Mar 3, 9:50 am, burcu hamamcıoğlu wrote:
> I wrote a query like : applications =
> Application.objects.filter(name__contains=searchText)
> I want to get the applications filtered by searchText. If the app. name is
> "Guitar" and my serachText is "guitar", django can't find it, makes the
> quer
http://docs.djangoproject.com/en/dev/topics/db/queries/#topics-db-queries
to do case insensitive try
Application.objects.filter(name__iexact=searchText)
iexact
A case-insensitive match. So, the query:
>>> Blog.objects.get(name__iexact="beatles blog")
Would match a Blog titled "Beatles Blog", "
I wrote a query like : applications =
Application.objects.filter(name__contains=searchText)
I want to get the applications filtered by searchText. If the app. name is
"Guitar" and my serachText is "guitar", django can't find it, makes the
query in case-sensitive format. How can i ignore this.?
--~
4 matches
Mail list logo