First time here? Check out the FAQ!

new type of post..


What do you think would be the best way to create a new type of 'Post'?
(other than question/answer/comment/tag_wiki/..)

Specifically, I'd like to add translate type.
It will have two texts/htmls/authors/edit_dates and etc, one for each language.
For example, english text -> korean text translate,
we would need one author field for english another for korean.

Please advise me how to add such a post type.

pcompassion's avatar
asked 2013-05-27 01:46:56 -0600, updated 2013-05-27 01:59:35 -0600
edit flag offensive 0 remove flag close merge delete


pcompassion's avatar pcompassion (2013-07-14 23:49:15 -0600) edit
add a comment see more comments

1 Answer


To answer your question - it is possible to create other post types by using a different value for the Post.post_type but there may be a bit of pain as there are some checks in the code similar to:

if post.post_type == ...:
elif ...
    raise NotImplementedError()

So you will have to change some of that code or think of how to fix it so that adding another post type does not create as much resistance.

We would actually like to develop the UI for the translation of posts into different languages, but thinking of keeping questions and answers in different languages largely decoupled - in the same style that wikipedia does, but provide links between the translated pairs of questions. It will be very difficult to keep all the structure of questions, answers and the comments in sync between the various translations.

Unlike wikipedia though we do support multiple languages working on the same instance.

Evgeny's avatar
answered 2013-05-27 21:54:53 -0600, updated 2013-05-27 21:58:42 -0600
edit flag offensive 0 remove flag delete link


Thanks for the input. My translation_type would be something different from what you describe at the moment. Mine would show two versions in different languages side by side in one page.

pcompassion's avatar pcompassion (2013-05-28 00:22:56 -0600) edit

Ok, then you might need to make some changes in askbot code base - perhaps those changes might be integrated into the askbot app as is - so that it would be easier to create new post types in the future. Seems like you'll need to maintain either a fork or some sort of extensions to achieve your goal.

Evgeny's avatar Evgeny (2013-05-28 00:29:07 -0600) edit
add a comment see more comments