Ask Your Question
3

Can type of message be changed freely?

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

Olloff gravatar image

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

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
2

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

Evgeny gravatar image

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

Comments

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

Olloff gravatar imageOlloff ( 2012-04-24 08:10:54 -0500 )edit
1

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

Evgeny gravatar imageEvgeny ( 2012-04-24 08:19:02 -0500 )edit

Thank you, Evgeny!

Olloff gravatar imageOlloff ( 2012-04-24 08:43:12 -0500 )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

Stats

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

Seen: 143 times

Last updated: Apr 24 '12