-
Notifications
You must be signed in to change notification settings - Fork 3
Setup
- Linux distribution
Recommended: Ubuntu 14.04 or 16.04 (https://www.ubuntu.com/download)
Start terminal app.
Ctrl + Alt + T
Install Git.
sudo apt-get install git
Install necessary tools.
sudo apt-get install python-pip virtualenv virtualenvwrapper
Append to .bashrc file.
...
# Virtualenvwrapper settings
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects
source /etc/bash_completion.d/virtualenvwrapper
Source .bashrc file
source .bashrc
Create Projects folder (ex. /home/goran/Projects/). This is where bloshi will reside.
mkdir Projects
Make a new folder in your Projects folder.
cd home/goran/Projects
mkdir bloshiproject
Make & activate virtualenv project with virtualenvwrapper (mkvirtualenv [-a project_path] ENVNAME).
mkvirtualenv -a /home/goran/Projects/bloshiproject/ bloshiproject
Setup git if needed & clone the project. Note the dot in the second command.
cd bloshiproject
git clone git@github.com:gskoljarev/bloshi.git .
Create & populate .env file from provided .env.sample file.
cp .env.sample .env
- SECRET_KEY may be generated at http://www.miniwebtool.com/django-secret-key-generator/
Deactivate and activate virtual environment
deactivate
workon bloshiproject
Enter bloshi folder.
cd bloshi
Install needed requirements.
pip install -r requirements.txt
If there are requirement errors, possible solutions:
If the project is not being setup locally, but on a server:
sudo apt-get install python-dev libpq-dev
Pillow error:
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
Run migrations
python manage.py migrate
Create a superuser
python manage.py createsuperuser
Collect static files
python manage.py collectstatic