Skip to content

Setting Up Your Development Environment

mperice edited this page Nov 13, 2015 · 1 revision

Local installation

Prerequisites

  • python = 2.7.x
  • pip
  • virtualenv/wrapper (optional)

Installation

Creating the environment

Create a virtual python environment for the project. If you're not using virtualenv or virtualenvwrapper you may skip this step.

For virtualenvwrapper

mkvirtualenv --no-site-packages textflows-env

For virtualenv

virtualenv --no-site-packages textflows-env
cd textflows-env
source bin/activate

Clone the code

Obtain the url to your git repository.

git clone [email protected]:xflows/textflows.git

Install requirements

cd textflows
pip install -r requirements.txt

Configure project

cp mothra/__local_settings.py mothra/local_settings.py
nano mothra/local_settings.py

Sync database

NOTE: when asked to create a superuser, answer 'no'. You will do that a little later.

python manage.py syncdb

Migrate database

python manage.py migrate

Create a superuser

python manage.py createsuperuser

Import packages

python manage.py import_all

Running

python manage.py runserver

Running with debugger

python manage.py runserver_plus

Open browser to http://127.0.0.1:8000

MAINTENANCE NOTE:

Everytime you pull a new version from the repository, you must run in order to import new packages.

python manage.py import_all