- python 2.7
- comes by default on most systems
- check installed version with
python -V
- pip: package manager for python
- install with
sudo easy_install pip
- install with
- django 1.5
- install with
sudo pip install django==1.5
- install with
- numpy
- install with
sudo pip install numpy
- install with
- clone the git repository:
- e.g.
git clone https://github.com/BerkeleyAutomation/cafe.git
- e.g.
cd cafe/src/server/opinion
cp settings_local_default.py settings_local.py
python manage.py syncdb --noinput
python manage.py createsuperuser --username=admin [email protected] --noinput
- either load a database OR populate database with random data, see below
python manage.py runserver
- open a web browser to
http://localhost:8000
- Run these commands from the
cafe/src/server/opinion
directory python scripts/create_db.py 5
python scripts/populate_db_random.py
python scripts/add_ud_cache_for_ratings.py
python scripts/recalculate_median_grades.py
cd cafe/src/server/opinion
python manage.py loaddata file.json
python manage.py shell
>>> from opinion_core.models import *
>>> DiscussionComment.objects.all()
- copy an example from
scripts/
that sounds similar - To run a script when using sqlite you must be in the
opinion/
directory. From theopinion/
directory, runpython scripts/script.py
cd mooc-cafe/src/server/opinion
python manage.py dumpdata --exclude contenttypes > file.json