Code for Life repository
A- Ocado Technology's Code for Life initiative has been developed to inspire the next generation of computer scientists and to help teachers deliver the computing curriculum.
- This repository hosts the source code of the main website: the portal for the Code For Life initiative, the registration/log in, the teachers' dashboards, the teaching materials, etc
- The other repos for Code For Life:
- the first game, Rapid Router
- the new game for teenagers, currently at a very early stage
- the deployment code for Google App Engine
Running Locally
-
Clone the repo. Fork it first if you want to contribute, or make sure you work on separate branches.
-
Install prerequisites. E.g. on Ubuntu / Linux Mint:
sudo apt-get install git
sudo apt-get install python-dev
sudo pip install virtualenvwrapper
sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev
sudo apt-get install ruby2.0
- still Ruby 1.9 hiding underruby
command.sudo gem install sass -v 3.3.4
- later versions incompatible with Ruby 1.9 (see above).
-
Make and activate a virtualenv (We recommend virtualenvwrapper)
- e.g. the first time,
mkvirtualenv -a path/to/codeforlife-portal codeforlife-portal
- and thereafter
workon codeforlife-portal
- create settings file under
example_project/example_project/local_settings.py
withEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
- e.g. the first time,
-
./run
- This will:- install all of the dependencies using pip
- sync the database
- collect the static files
- run the server
-
Once you see
Quit the server with CONTROL-C
, you can open the portal in your browser atlocalhost:8000
. -
If you have problems seeing the portal on machines with different locale (e.g. Polish), check the terminal for errors mentioning
ValueError: unknown locale: UTF-8
. If you see them, you need to have environment variablesLANG
andLC_ALL
both set toen_US.UTF-8
.- Either export them in your
.bashrc
or.bash_profile
- or restart the portal with command
LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 ./run
.
- Either export them in your
How to contribute!
Guidelines Read the contributing guidelines, thanks!
One word of caution: please do not add any issues related to security. Evil hackers are everywhere nowadays... If you do find a security issue, let us know using our contact form.
Want to help? You can contact us using this contact form and we'll get in touch as soon as possible! Thanks a lot.
Common Problems
Unapplied migrations on first run
It may be that some migrations were changed and you have .pyc files from the old ones. Try removing all .pyc migrations by running rm migrations/*.pyc
from the repository.