-
Notifications
You must be signed in to change notification settings - Fork 13
Local development instructions
Tom Nurse edited this page Nov 17, 2020
·
3 revisions
- Clone the repo and
cd
into it. - Make sure you have python, pip, and prereqs for Pillow installed. We support python 3.4+ (with django > 2.0).
- Mac:
brew install python && sudo pip install virtualenv
- Ubuntu:
sudo apt-get install python{,-dev,-pip,-imaging,-virtualenv} build-essential
- Other Linux: Ensure you have python, pip, virtualenv, and a compiler.
- Mac:
- Make a virtual environment to install libs without root in the 'env' folder:
virtualenv env
(use with--python=pythonX.Y
to specify a python version) - Install all libraries:
pip install -r requirements_debug.txt
- Build the SQLite database:
python manage.py migrate
- Make a superuser account:
python manage.py createsuperuser
- Activate the virtual environment:
source env/bin/activate
- Use it:
- View on web:
python manage.py runserver
- Run tests:
python manage.py test -n
('-n' bypasses database migrations) - REPL with data:
python manage.py shell_plus
- View on web:
- Install PyCharm Professional. There are free open-source/education licenses available.
- Clone the repo in the software
- Specify requirements file as "requirements_debug.txt"
- Add a new local virtualenv environment under interpreter settings.
- Select the virtualenv in project settings
- Sync the requirements to install dependencies.
- Make the `site_tmpl' folder a template folder in Project Structure.
- Create the database: Tools>Run manage.py task>"migrate"
- Create a superuser: Tools>Run manage.py task>"createsuperuser"
- Run server/tests/shell.