Homely RESTful webapp for c4tk
These instructions should work on Ubuntu 15.04 (Vivid Vervet) and Mac OS X Yosemite. I can't vouch for other *nix OSes.
I couldn't get this to work on Windows, so if you're on Windows (as I often am) I suggest you run Ubuntu in VirtualBox.
- Python 2.7+ or Python 3.4+
- The Python developer package on Linux. Get it with
sudo apt-get install python-dev
on Ubuntu or a similar, appropriate command for your Linux distro (such assudo yum install python-devel
on CentOS). - pip
- virtualenv
- Clone the repository.
- In a terminal window in your local copy of the repo, create a virtual environment with
virtualenv venv
. - Activate the virtual environment with
source venv/bin/activate
. - Install the required packages with
pip install -r requirements.txt
.
- Download and install PostgreSQL server for your platform.
- Start postgres.
- Using the terminal or pgadmin:
- Create a user
pyhomely
with passwordpyhomely
. - Create a database
homely
owned by that userpyhomely
. - Make a file called
homely/local_settings.py
. The easiest way to do that is to copyhomely/local_settings.py.template
, rename the copy tolocal_settings.py
, and edit it as you need to. - Run
python manage.py migrate
to setup the db. - You might also want to create a super user for use in the admin console and rest interface with
python manage.py createsuperuser
. - Go to http://localhost:8000/api/ to see the api running locally on your machine!