-
Notifications
You must be signed in to change notification settings - Fork 24
Setting up a Devilry development environment (deprecated)
This guide is deprectated. Use Setting up a Devilry development environment instead.
You will need to have Python 2.7 and git installed.
Download and install Django 1.3. See Django's install guide for instructions.
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/
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-django
directory to the PYTHONPATH
:
export PYTHONPATH=$PYTHONPATH:$HOME/devilry/devilry-django
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.
export DJANGO_SETTINGS_MODULE=devilry.projects.dev.settings
source ~/devilry/devilry-django/devilry/devilryadmin/devilryadmin_bashcompletion
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).
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).
Use:
devilryadmin.py simplifiedtestdb
to create an exampledatabase with 4 subjects and multiple assignments. Run with --help
for more details.