update README

This commit is contained in:
Thomas Steen Rasmussen 2017-01-20 17:47:10 +01:00
parent b4f3c386c3
commit 3125195554

View file

@ -6,31 +6,50 @@ Django project to power Bornhack. Features include news, villages, webshop, and
### Virtualenv ### Virtualenv
Create a Python 2.7 virtual environment and activate it: Create a Python 2.7 virtual environment and activate it:
$ virtualenv venv ```
$ source venv/bin/activate $ virtualenv venv
$ source venv/bin/activate
```
### System libraries ### System libraries
Install system dependencies (method depends on OS): Install system dependencies (method depends on OS):
- postgresql headers (for psychopg2) - postgresql headers (for psychopg2):
- Debian: ?
- FreeBSD: ?
- libjpeg (for pdf generation) - libjpeg (for pdf generation)
- Debian: libjpeg-dev
- FreeBSD: ?
### Python packages ### Python packages
Install pip packages (pick either development or production): Install pip packages:
(venv) $ pip install -r requirements/development.txt ```
(venv) $ pip install -r requirements/production.txt (venv) $ pip install -r requirements.txt
```
### Configuration file ### Configuration file
Copy environment file template and change settings: Copy environment file template and change settings as needed:
```
(venv) $ cp bornhack/settings/env.dist bornhack/settings/.env (venv) $ cp bornhack/settings/env.dist bornhack/settings/.env
```
### Database ### Database
Is this a new installation? Initialize the database: Is this a new installation? Initialize the database:
(venv) $ ./manage.py migrate --settings=bornhack.settings.development ```
(venv) $ ./manage.py createsuperuser --settings=bornhack.settings.development (venv) $ ./manage.py migrate
```
Is this for local development? Bootstrap the database with dummy data and users:
```
(venv) $ ./manage.py bootstrap-devsite
```
### Done ### Done
Is this for local development? Start the Django devserver: Is this for local development? Start the Django devserver:
(venv) $ ./manage.py runserver --settings=bornhack.settings.development ```
(venv) $ ./manage.py runserver
```
Otherwise start uwsgi or similar to serve the application. Otherwise start uwsgi or similar to serve the application.
Enjoy!