First time here? Check out the FAQ!
1

How to rebuild summary ?
 

This question is related to askbot.org/en/question/12356/questionhtml-vs-questionsummary/

I want to rebuild the summary column of the askbot_post table. Because of its name, i tried to use the following manage command:

python manage.py build_thread_summary_cache

but it was not working. What is the purpose of this command ?

Then i tried the following:

python manage.py generate_post_snippets

and it worked! Hence, given the generic name of this command, my question is: what else does this command ? Can i lose some information with it ? Is it only about rebuilding some secondary informations ?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
tmonteil's avatar
63
tmonteil
asked 11 years ago

Comments

see more comments

1 Answer

0

The command generate_post_snippets generates post's HTML. The posts as you see them are stored in two fields: "summary" and "html". The first may contain a truncated version if the post is too long, otherwise it will be identical to the "html" - which is the full content of the post.

The build_thread_summary_cache will create cached html snippets for each question, as shown on the main page in the list of questions.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago
link

Comments

2

Thanks for the answer. So perhaps should those scripts be called in a migration scripts (the summaries were not automatically filled while migrating from a 0.7.22 install).

tmonteil's avatar tmonteil (11 years ago)
see more comments