Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Setting up Peopleflow for development

deepakjois edited this page Jul 2, 2012 · 3 revisions

Instruction for setting up a development environment for PeopleFlow.

Prerequisites

  • Python 2.7
  • SQLite 3

Setup for Development

Download Source

Clone repo from Github

$ git clone https://github.com/hasgeek/peopleflow.git

Install pip

Install virtualenv and pip

$ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
$ python virtualenv.py hasgeek_env
$ . hasgeek_env/bin/activate

Install dependencies from requirements.txt

$ cd peopleflow
$ pip install -r requirements.txt

Setup a FQDN for your desktop

Edit your /etc/hosts file, to give your development machine a fully qualified domain name

0.0.0.0 vyom.peopleflow.hasgeek.com

Setup LastUser account and application

Peopleflow uses LastUser to manage logins. In order to login, create an account on auth.hasgeek.com, and then create a new application. Assuming the domain name for your desktop is vyom.peopleflow.hasgeek.com, here are the inputs for the fields in the application form:

  • Website: http://vyom.peopleflow.hasgeek.com:8000/
  • Redirect URI: http://vyom.peopleflow.hasgeek.com:8000/login/redirect

Once the application is created, note down the Client Id and Client secret.

After creating the application, define a new permission for the app

Add settings

Create a copy of the instance/settings-sample.py to instance/settings.py

$ cp instance/settings-sample.py instance/settings.py

Edit instance/settings.py to add the following settings:

  • SQLALCHEMY_DATABASE_URI: 'sqlite:///test.db'
  • LASTUSER_SERVER: 'https://auth.hasgeek.com'
  • LASTUSER_CLIENT_ID: '<client-id>'
  • LASTUSER_CLIENT_SECRET: '<client-secret>'

Start development server

Finally, try starting the development server on your desktop

$ python runserver.py
* Running on http://0.0.0.0:8000/
 * Restarting with reloader
Unable to locate additional settings file development.py

You can now launch the site in the browser, and login using the account you used previously on auth.hasgeek.com.