2015-10-03 01:07:05 +00:00
|
|
|
# Bornhack
|
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
Django project to power Bornhack. Features include news, villages, webshop, and more.
|
2015-10-03 01:07:05 +00:00
|
|
|
|
|
|
|
## Quickstart
|
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
### Virtualenv
|
2016-06-20 12:45:38 +00:00
|
|
|
Create a Python 2.7 virtual environment and activate it:
|
2016-07-03 12:27:31 +00:00
|
|
|
$ virtualenv venv
|
|
|
|
$ source venv/bin/activate
|
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
### System libraries
|
|
|
|
Install system dependencies (method depends on OS):
|
|
|
|
- postgresql headers (for psychopg2)
|
|
|
|
- libjpeg (for pdf generation)
|
2016-07-03 12:27:31 +00:00
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
### Python packages
|
|
|
|
Install pip packages (pick either development or production):
|
2016-07-03 12:27:31 +00:00
|
|
|
(venv) $ pip install -r requirements/development.txt
|
2016-11-09 08:55:15 +00:00
|
|
|
(venv) $ pip install -r requirements/production.txt
|
2016-07-03 12:27:31 +00:00
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
### Configuration file
|
|
|
|
Copy environment file template and change settings:
|
2016-07-03 12:27:31 +00:00
|
|
|
(venv) $ cp bornhack/settings/env.dist bornhack/settings/.env
|
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
### Database
|
|
|
|
Is this a new installation? Initialize the database:
|
2016-07-03 12:27:31 +00:00
|
|
|
(venv) $ ./manage.py migrate --settings=bornhack.settings.development
|
|
|
|
(venv) $ ./manage.py createsuperuser --settings=bornhack.settings.development
|
2016-08-29 18:43:50 +00:00
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
### Done
|
|
|
|
Is this for local development? Start the Django devserver:
|
|
|
|
(venv) $ ./manage.py runserver --settings=bornhack.settings.development
|
2016-08-29 18:43:50 +00:00
|
|
|
|
2016-11-09 08:55:15 +00:00
|
|
|
Otherwise start uwsgi or similar to serve the application.
|
2016-08-30 09:37:38 +00:00
|
|
|
|