Ask Your Question

Can type of message be changed freely?

asked 2012-04-23 23:21:07 -0600

Olloff's avatar

updated 2012-04-23 23:44:30 -0600

For example, user posted message as "answer" but I want to change its type to "comment" or even pick out some messages as questions.

I know I can change type of post in django-livesettings/posts but "comment -> answer" works fine and "answer -> comment" works only after I add another comment (possibly this can be cache issue).

EDIT: Works only on lastest posts. Cant explain this.

Transformation "answer/comment -> question" not works at all and drops error 500 each time.

Can this be possible?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-24 07:23:49 -0600

Evgeny's avatar

The thread cache needs to be invalidated after any change like that.

Post type, post_object.post_type value can be changed within allowed limits, also value of post_object.parent needs to be updated when moving the post around.

We have the feature (repost X as Y) planned.

edit flag offensive delete link more


Ehm, next question is how to invalidate thread cache manually? Does Askbot have existent function for that?

Olloff's avatar Olloff  ( 2012-04-24 08:10:54 -0600 )edit

Yes - thread_object.invalidate_cached_post_data(). Thread can be accessed from each post by post_object.thread

Evgeny's avatar Evgeny  ( 2012-04-24 08:19:02 -0600 )edit

Thank you, Evgeny!

Olloff's avatar Olloff  ( 2012-04-24 08:43:12 -0600 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2012-04-23 23:21:07 -0600

Seen: 305 times

Last updated: Apr 24 '12