blob: b2a39e1c624aff81d3bb69d9e78c56fdf8071812 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
this app's function will be to:
* install it's own tables <--- done
* read SE xml dump into DjangoDB <--- done
* populate osqa database <-- user accounts and Q&A revisions loaded
* remove SE tables
Current process to load SE data into OSQA:
1) backup database
2) unzip SE dump into dump_dir (any directory name)
you may want to make sure that your dump directory in .gitignore file
so that you don't publish it by mistake
3) add 'stackexchange' to the list of installed apps (probably aready in settings.py)
4) (optional - create models.py for SE, which is included anyway) run:
#a) run in-place removal of xml namspace prefix to make parsing easier
perl -pi -w -e 's/xs://g' $SE_DUMP_PATH/xsd/*.xsd
cd stackexchange
python parse_models.py $SE_DUMP_PATH/xsd/*.xsd > models.py
5) Install stackexchange models (as well as any other missing models)
python manage.py syncdb
6) make sure that osqa badges are installed
if not, run (example for mysql):
mysql -u user -p dbname < sql_scripts/badges.sql
7) load SE data:
python manage.py load_stackexchange dump_dir
if anything doesn't go right - run 'python manage.py flush' and repeat
steps 6 and 7
|