1
1

If I want to pre-populate the database with some questions, how would I go about doing it? Should I insert the question in the database directly? Or should I go through some Python API to do so?

It seems like I have to create a dummy user account for the purpose above as well because anonymous user is not really supported by OSQA.

Any idea would be much appreciated. Thanks.

asked 04 Aug '10, 12:15

bbpan's gravatar image

bbpan
1562710
accept rate: 28%


You can try the code snipets in this answer. That should give you a good start. Inserting directly in the database is not a very good option :)

link

answered 04 Aug '10, 13:59

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.5k65570
accept rate: 52%

The code snippet for importing user works, but importing questions doesn't work.

(05 Aug '10, 01:47) bbpan
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×57
×20
×8

Asked: 04 Aug '10, 12:15

Seen: 717 times

Last updated: 05 Aug '10, 01:47

powered by OSQA