Ask Your Question
2

View all "community-wiki" questions on an askbot site?

asked 2014-07-12 20:20:10 -0600

updated 2016-07-22 07:02:24 -0600

On an askbot-powered site, can one get the list of "community-wiki" questions?

(It is easy to get a list of questions with a certain tag, but the "community-wiki" stamp does not work like other tags.)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2016-07-23 01:30:53 -0600

luckystar1992 gravatar image

There's not a valued configuration can achieve your target, but you can edit your source code with this method:

the main question query code are in askbot.views.readers.py file and in the questions(request, **kwargs) function , it get the queryset from this line -- qs, meta_data=models.Thread.objects.run_advanced_search(**). so, we can tell some query parameters are set in the run_advanced_search function,  go into this function and you can find the primary_filter dict, add your self configuration to this query dict--may like this:

before

primary_filter = { 'posts__post_type': 'question', 'posts__deleted': False }

after

primary_filter = { 'posts__post_type': 'question', 'posts__deleted': False, 'posts__wiki':True, } be carefully, between the post and wiki , it is a double underline.

I have tested in my development code, and hope it can help you.

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

1 follower

Stats

Asked: 2014-07-12 20:20:10 -0600

Seen: 706 times

Last updated: Jul 23 '16