On Mon, Oct 12, 2009 at 2:41 PM, chris <cwfu...@gmail.com> wrote:
>
> Hello,
>
> I am trying to work my way through Practical Django Projects (a book
> by James Bennett 1st edition 2008).  I'm on chapter 3 page 28 where a
> search function is being added to the 'cms' project.  The
> results=FlatPage.objects.filter(content_icontains=query) does not
> work; it looks like the content_icontains attribute isn't recognize by
> the 'filter' method.  I've tried looking through the django api but
> don't understand how it's set up.  What is the fix required here?

Have you typed content_icontains like your email suggests, or
content__icontains (note the double underscore)? Django uses a double
underscore to separate joins and query conditions from attribute
names.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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