Skip to content

Setting up a Devilry development environment (deprecated)

espenak edited this page Aug 25, 2011 · 2 revisions

This guide is deprectated. Use Setting up a Devilry development environment instead.

Download the necessary software

You will need to have Python 2.7 and git installed.

Django

Download and install Django 1.3. See Django's install guide for instructions.

Devilry

Download the devilry source code using git, like so: git clone git://github.com/devilry/devilry-django.git

For convenience, we expect the git command was executed in ~/devilry so you should now have a directory ~/devilry/devilry-django/

Set up environment variables

Add Django to the PYTHONPATH

Add your Django installatino to the PYTHONPATH: export PYTHONPATH=$PYTHONPATH:/path/to/django-1.3

Verify with the python shell:

$ python
Python 2.7.1 ....
................
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>>

Add Devilry to the PYTHONPATH

Add devilry-django directory to the PYTHONPATH: export PYTHONPATH=$PYTHONPATH:$HOME/devilry/devilry-django

Symlink to devilryadmin.py

Create a symlink to devilryadmin.py like this ln -s $HOME/devilry/devilry-django/devilry/devilryadmin ~/bin/ where ~/bin must be a directory on the PATH.

Set up DJANGO_SETTINGS_MODULE

export DJANGO_SETTINGS_MODULE=devilry.projects.dev.settings

Add devilryadmin bash completion

source ~/devilry/devilry-django/devilry/devilryadmin/devilryadmin_bashcompletion

Ready to test devilry

Create database

Use devilryadmin.py to create an empty database and add the superuser grandma by running:

devilryadmin.py init_exampledb
devilryadmin.py load_grandmauser

The grandma user has test as password. Repeat the two steps above to reset the database. Run devilryadmin.py without any arguments to see all developer and admin commands available (such as commands for creating huge sets of example data).

Start the server

From ~/devilry/devilry-django/devilry/projects/dev, start the test server: python manage.py runserver

Visit http://localhost:8000/administrator/ to see that everything is working (NOTE: the UI is currently very unstable).

Generate an example database

Use:

devilryadmin.py simplifiedtestdb

to create an exampledatabase with 4 subjects and multiple assignments. Run with --help for more details.

Clone this wiki locally