First time here? Check out the FAQ!
3

Can type of message be changed freely?
 

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?

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)
Olloff's avatar
97
Olloff
asked 13 years ago, updated 13 years ago

Comments

see more comments

1 Answer

2

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.

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 13 years ago
link

Comments

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

Olloff's avatar Olloff (13 years ago)
1

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

Evgeny's avatar Evgeny (13 years ago)

Thank you, Evgeny!

Olloff's avatar Olloff (13 years ago)
see more comments