-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAalto+_installation_and_setup.txt
88 lines (71 loc) · 3.75 KB
/
Aalto+_installation_and_setup.txt
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Aalto+:
Installation and Setup:
Windows:
- Install Python
- Install python setuptools
- Download EXE from http://pypi.python.org/pypi/setuptools
- Download Django
tar xzvf Django-1.4.1.tar.gz
cd Django-1.4.1
python setup.py install
- Install MySQL Server
- Start a MySQL command prompt
- CREATE DATABASE <database_name>;
- GRANT ALL ON <database_name>.* TO '<database_user>'@'localhost' IDENTIFIED BY '<database_user_password>';
- exit
- See "Both" section for remaining instructions
Linux:
- sudo apt-get install python
- Download and install Django
tar xzvf Django-1.4.1.tar.gz
cd Django-1.4.1
python setup.py install
- sudo apt-get install python-setuptools (easy_install)
- sudo apt-get install mysql-server
- Start mysql prompt
- mysql -u root -p [ENTER]
- Enter your password when prompted
- CREATE DATABASE <database_name>;
- GRANT ALL ON <database_name>.* TO '<database_user>'@'localhost' IDENTIFIED BY '<database_user_password>';
- exit
- See "Both" section for remaining instructions
Both:
- easy_install MySQL-python
- If this doesn't work in Windows, you can install from an EXE - https://code.google.com/p/soemin/downloads/detail?name=MySQL-python-1.2.3.win32-py2.7.exe
- See requirements.txt in aaltoplus directory (listed below for convenience), remove sudo for Windows
- sudo easy_install oauth2
- sudo easy_install simplejson
- sudo easy_install feedparser
- sudo easy_install icalendar
- sudo easy_install mimeparse
- sudo easy_install python-dateutil
- sudo easy_install django-tastypie
Install memcache
- pip install python-memcached
Install user agent (http://pypi.python.org/pypi/django-user_agents)
- pip install pyyaml ua-parser user-agents
- pip install django-user-agents
- git clone https://[email protected]/cashaffer/Aalto--.git Aalto
- cd Aalto/aaltoplus
- Change values in settings.py file
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '<database_name>', #g3et_path('test.db'), # Or path to database file if using sqlite3.
'USER': '<database_user>', # Not used with sqlite3.
'PASSWORD': '<database_user_password>', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
- For both values under 'TEMPLATE_LOADERS = (' change 'load_template_source' to 'Loader'
- Update BASE_URL to have IP and port of Django server (optional?)
BASE_URL = "<IP>:<PORT>"
Ex: BASE_URL = "127.0.0.1:8000"
- python manage.py syncdb
- Create an administrator (superuser) account when prompted
- python manage.py runserver 0.0.0.0:8000
- In your web browser, go to: http://127.0.0.1:8000/admin/
Note:
- Due to cross-domain communication issues, the files communicating with the Django server must be hosted on a server and that server must be listed in the 'XS_SHARING_ALLOWED_ORIGINS' variable in the settings.py file. For OpenDSA development, we are hosting our files on 'http://algoviz-beta.cc.vt.edu'
- To enable OpenDSA to communicate with the Django server, you must include the IP of your server in ODSAkhan-exercises/khan-exercises.js and RST/source/_static/ODSA.js
- In khan-exercise.js, look for:
server = typeof apiServer !== "undefined" ? apiServer :
testMode ? "http://128.173.55.223:8080" : "",
- In ODSA.js, change the value in the server variable at the top of the file