Ask Your Question
1

How can I filter questions by title/name?

asked 2013-01-10 13:01:01 -0500

mornaner's avatar

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-14 10:22:22 -0500

You can try this:

Post.objects.get_questions().filter(thread__title__icontains='foo')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-10 13:01:01 -0500

Seen: 233 times

Last updated: Jan 14 '13