The portal code for Code for Life
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github Added templates for issues and a PR template (#818) Nov 8, 2018
deploy
docs Remove compressor Nov 19, 2015
example_project Make the portal compatible with Django 1.9.13 (#752) Jul 17, 2018
portal Menu box update 2: student buttons (#820) Sep 26, 2018
ratelimit Coveralls ignores test files and egg files. Fixes #599. Aug 1, 2017
reports Removed use of django.conf.urls.patterns() (#738) Jun 20, 2018
teaching_packs Updates solution for level 27 in resources. Mar 13, 2017
.codeclimate.yml Reenabled scss-lint in codeclimate Jun 30, 2017
.csslintrc codeclimate change Sep 7, 2016
.eslintrc
.gitattributes Add tag based versioning using versioneer Nov 4, 2015
.gitignore Add __pycache__ into .gitignore (#764) Jul 4, 2018
.scss-lint.yml Update profile dropdown (#807) Sep 11, 2018
.travis.yml Added quotes to deploy password. (#819) Sep 25, 2018
CONTRIBUTING.md Updates wording and copied to readme. Aug 18, 2017
LICENSE.md Added license Aug 12, 2015
MANIFEST.in Fix the packaging of wheels Jan 7, 2016
Pipfile Generated Pipfile, updated docs (#787) Aug 6, 2018
Pipfile.lock Fix master travis build by fixing a subdependency to django-otp versi… Aug 29, 2018
README.md
install-win.bat Remove ruby sass dependency (#772) Jul 17, 2018
run Generated Pipfile, updated docs (#787) Aug 6, 2018
run.bat
setup.cfg Delete unused test file and actually ignore version file. Fixes #635. Aug 22, 2017
setup.py
test_settings.py
versioneer.py Fix the packaging of wheels Jan 7, 2016
windows-requirements.txt

README.md

Build Status Coverage Status Code Climate

A Code for Life repository

  • 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:

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 apt-get install libxml2-dev libxslt1-dev zlib1g-dev
  • Make and activate a virtualenv (We recommend pipenv)

    • On Mac, run brew install pipenv using the brew package manager. Then run pipenv install followed by pipenv shell.
    • On Linux, follow the instructions here to install pipenv. Then run pipenv install followed by pipenv shell.
    • create settings file under example_project/example_project/local_settings.py with EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  • ./run - This will:

    • 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 at localhost:8000.

  • To setup test dependencies and run tests, you can use python setup.py test

  • 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 variables LANG and LC_ALL both set to en_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.

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.