First time here? Check out the FAQ!
1

How can I filter questions by title/name?

I'm trying to find an exact question in the django console but I can't guess how.

I've done the following:

from askbot.models import Post
questions = Post.objects.get_questions()

Now, how to filter them by title?

mornaner's avatar
109
mornaner
asked 2013-01-10 13:01:01 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

You can try this:

Post.objects.get_questions().filter(thread__title__icontains='foo')
Fitoria's avatar
1.1k
Fitoria
answered 2013-01-14 10:22:22 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments