First time here? Check out the FAQ!

tmonteil's profile - activity

2016-03-06 04:45:26 -0500 received badge Necromancer ( source )
2016-03-06 04:44:27 -0500 received badge Necromancer ( source )
2016-03-06 04:44:27 -0500 received badge Teacher ( source )
2016-01-08 05:34:05 -0500 received badge Good Question (source)
2016-01-08 05:33:49 -0500 received badge Famous Question (source)
2016-01-08 05:33:48 -0500 received badge Popular Question (source)
2016-01-08 05:33:48 -0500 received badge Notable Question (source)
2014-11-25 12:30:13 -0500 received badge Famous Question (source)
2014-11-25 10:51:11 -0500 received badge Nice Question (source)
2014-04-14 15:30:31 -0500 received badge Student (source)
2014-04-06 03:40:53 -0500 received badge Scholar ( source )
2014-04-06 03:40:47 -0500 commented answer How to rebuild summary ?

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).

2014-04-01 11:50:15 -0500 asked a question 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 ?

2014-03-31 09:07:30 -0500 answered a question Askbot installation fails in migration due to 0 values in AutoField

As explained in question #11851 i had the same problem. Four migration scripts set 0 as a default value for ForeignKey, which seems not accepted. Instead, you can set None as the default value. The following changes in the migrations script should fix this problem:

  • go to the askbot/migrations directory
  • type:

    sed -i.old 's|\(ForeignKey.*\)default=0|\1default=None|g' 0055_*.py 0080_*.py 0093_*.py 0099_*.py

2014-03-31 09:06:28 -0500 answered a question ValueError: The database backend does not accept 0 as a value for AutoField.

I had the same problem. Four migration scripts set 0 as a default value for ForeignKey, which seems not accepted. Instead, you can set None as the default value. The following changes in the migrations script should fix this problem:

  • go to the askbot/migrations directory
  • type:

    sed -i.old 's|\(ForeignKey.*\)default=0|\1default=None|g' 0055_*.py 0080_*.py 0093_*.py 0099_*.py

2014-03-30 10:23:56 -0500 received badge Editor (source)
2014-03-30 06:33:21 -0500 asked a question question.html vs question.summary

We are migrating an old askbot website: the answers and comments disapeared and the questions are shortened.

The problem seems to be the following: instead of using the html column of the (new) askbot_post table, the website looks for the summary column of the same field, and since answers and comments have an empty summary, this explains both issues.

Indeed, if we replace:

  • {{ question.summary }} by {{ question.html }} in the askbot/templates/question/question_card.html file
  • {{ answer.summary }} by {{ answer.html }} in the askbot/templates/question/answer_card.html file
  • {{ comment.summary }} by {{ comment.html }} in the askbot/templates/macros.html file

Then we have a good website. It seems that the change that creates this problem is the following change (sorry, not enough karma to post a link : github.com/ASKBOT/askbot-devel/commit/0705ba63df2c3bf540109d52072c47317b3c105c

Moreover, the previous contents of the column summary of the askbot_post table are text, while the new settings, they are html.

Here are my questions.

  • Why is .summary replacing .html in the templates ?
  • In the current setting, is there a difference between the columns html and summary in the askbot_post table ?
  • If those columns are different, how to rebuild the old summary column according to the new convention (otherwise i can simply copy the html column over the summary column) ?
  • Is there a plan to support such a migration officially, so that we do not have to fork the code ?
  • What are the long term plans for those columns ?