First time here? Check out the FAQ!

Revision history  [back]

You will need to iterate over users, questions, answers and comments.

User records can be accessed from Python code as follows:

from askbot.models import User
users = User.objects.all() # you will need at least the fields: username, email

Questions, comments and answers are accessible via the Post model:

from askbot.models import Post
questions = Post.objects.filter(post_type='question')
answers = Post.objects.filter(post_type='answer')
comments = Post.objects.filter(post_type='comment')

Question id which is part of the url is id of question object (i.e. question.id).

Post text is some_post.text - a markdown source, some_post.html - rendered html of the post.

Question title is question.thread.title

Tags are question.thread.tagnames

Post votes are some_post.vote_up_count and some_post.vote_down_count

This is probably the minimum you need. That is you'll need to create a script iterating over the objects that I've mentioned above and store the result in some file.

Obviously, how to import that data wherever you want to move it depends on the software package you intend to use in the future.