This is our third take on badges! It boils down to this: Create a badge, submit a project for a badge, get feedback and revise your project, receive the badge, give feedback and build the value of the badge you have by being part of an awesome community around it!
This project is written using django. Most dependencies are handled by Pip, but there are a few initial system requirements.
The following packages need to be installed on your system:
- Python 2.7+
- Virtualenv
- Git
- PostgreSQL and PostgreSQL-dev
- Ruby
Ruby and Python come pre-installed on Ubuntu Linux.
To install the additional dependencies on Ubuntu Linux, use a graphical package manager or the following commands in Terminal:
sudo apt-get install postgresql postgresql-server-dev-all
sudo pip install virtualenv virtualenvwrapper
To complete the virtualenvwrapper installation, follow the virtualenv installation instructions.
The SASS package can be installed through Ruby Gems.
sudo gem install sass
To get up and running for development
- Create a new virtual environment:
mkvirtualenv p2pu-badges
- Activate the virtual environment:
workon p2pu-badges
- Make a local copy of the code:
git clone https://github.com/p2pu/badges
- Move into the code directory:
cd badges
- Init submodules:
git submodule init
- Fetch submodules:
git submodule update
pip install -r badges/requirements.txt
Copy settings_local.dist.py to settings_local.py
Note: settings_local.dist.py is located in the subfolder /path/to/code/badges/badges/
cp badges/badges/settings_local.dist.py badges/badges/settings_local.py
- Sync database:
python badges/manage.py syncdb
- Migrate the database schema:
python badges/manage.py migrate
- Load some test data:
python badges/manage.py load_test_data testdata/test_data.json
- Run development server:
python badges/manage.py runserver
- Go to http://localhost:8000/ and play around
And lastly, fix all the bugs, add cool new features and take over the world :)
Documentation:
- Badges/Technology https://wiki.mozilla.org/Badges/Technology
- Assertions https://github.com/mozilla/openbadges/wiki/Assertions
Setup Development Environment:
- Prepare validator
- user online http://validator.openbadges.org/
- or install validator locally
- $ install nodejs and npm
- $ git clone https://github.com/mozilla/openbadges-validator-service.git
- $ cd openbadges-validator-service
- $ npm install
- $ node app.js
- point your browser to http://localhost:8888
- Amend settings_local.py
- set OPEN_BADGES_PUBLIC_URL to your development box (and later to production public url)
- if using local validator, OPEN_BADGES_PUBLIC_URL='http://localhost:8000'
- otherwise play with ssh remote tunneling and set OPEN_BADGES_PUBLIC_URL accordingly
- Open Badges urls:
- OPEN_BADGES_PUBLIC_URL/openbadges/assertions/
- OPEN_BADGES_PUBLIC_URL/openbadges/badge/<badge_id>
- OPEN_BADGES_PUBLIC_URL/openbadges/organisation