Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The next version of p2pu.org. Written in Django and made better. Forked from Batucada.
branch: master

This branch is 5143 commits behind p2pu:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
apps
docs
media
requirements
templates
.gitignore
LICENSE.txt
README.rst
__init__.py
manage.py
rmpyc
settings.py
settings_local.dist.py
urls.py

README.rst

Learnanta

Lernanta is the new platform for P2PU. We are building on the codebase from Batucada, a rewrite of drumbeat.org by Mozilla.

Get Involved

Interested in getting involved in Lernanta code development? Check out the development wiki [0] for more info! For a broader view on the development and tech team at P2PU, check out the P2PU Development and Tech team [1] page on the P2PU wiki [2] .

[0] https://github.com/p2pu/lernanta/wiki [1] http://wiki.p2pu.org/w/page/31978748/Development-and-tech-team [2] http://wiki.p2pu.org

Installation

You need a few prerequisites

sudo apt-get install python-setuptools python-dev build-essential

To install Lernanta, you must clone the repository:

git clone git://github.com/p2pu/lernanta.git

To get started, you'll need to make sure that virtualenv and pip are installed.

sudo easy_install virtualenv
sudo easy_install pip

You'll also need to have mysql installed (mysql-client, mysql-server, libmysqlclient-dev).

I recommend using virtualenvwrapper to manage your virtual environments. Follow the installation instructions. Once installed, create your virtual environment for lernanta and install the dependencies

cd lernanta
mkvirtualenv lernanta
workon lernanta
pip install -r requirements/compiled.txt
pip install -r requirements/prod.txt
pip install -r requirements/dev.txt

If you are doing an update, you might find it helps to delete pyc files:

find . -name "*.pyc" | xargs rm

You should create a settings_local.py. Most people will be able to get away with the template provided.

cp settings_local.dist.py settings_local.py

If the mysql database doesn't exist yet, create it.

mysqladmin -u <user> -p create <database name>

Next, sync the database and run migrations.

python manage.py syncdb --noinput --all

Finally, start the development server to take it for a spin.

python manage.py runserver

To run the test framework.

python manage.py test

To recreate the test database before running the tests.

FORCE_DB=True python manage.py test

After updating a database model you will have to make a migration for the change, then apply it.

python manage.py schemamigration <appname> --auto
python manage.py migrate <appname>
Something went wrong with that request. Please try again.