Ask Your Question
2

adding a new text field to question

asked 2012-06-12 14:54:34 -0500

kintali gravatar image kintali flag of United States
111 5 1 9
http://www.cs.princeton.e...

I am planning to add a new (optional) text field (with a single line textbox and at most 200 characters) to "the question" in askbot code. Please point me to files that need to be changed and other required steps (like database migration etc.,).

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-06-12 15:00:20 -0500

Evgeny gravatar image Evgeny flag of Chile
11009 50 84 182
http://askbot.org/

To make things simpler, create a model related to thread via foreign key and maintain it in the separate app, and have migrations for that app separately. That way it will be much easier to maintain your version and avoid clashes in the migrations.

The question model is askbot.models.Thread. There is also model askbot.model.Post, which contains all comment, answer and question bodies. Thread holds the question title, tags and some more things.

link publish delete flag offensive edit

Comments

Thanks Evgeny.

kintali ( 2012-06-12 15:38:28 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-06-12 14:54:34 -0500

Seen: 39 times

Last updated: Jun 12 '12