- Katie Jiang (Project Lead)
- Vaibhaw Ladha
- Ivan Esmeral
- Nina Chang
- Sarah Raines
- Siddharth Kumar
- Stephanie Shi
- Steven Bursztyn
- Suzanne Knop
$ git clone https://github.com/hack4impact/immigrant-defense-project.git
$ cd immigrant-defense-project
$ pip install virtualenv
$ virtualenv -p python3 env
$ source env/bin/activate
$ xcode-select --install
Create a file called .env
that contains environment variables in the following syntax: ENVIRONMENT_VARIABLE=value
.
You may also wrap values in double quotes like ENVIRONMENT_VARIABLE="value with spaces"
.
For example, the mailing environment variables can be set as the following.
We recommend using Sendgrid for a mailing SMTP server, but anything else will work as well.
MAIL_USERNAME=SendgridUsername
MAIL_PASSWORD=SendgridPassword
SECRET_KEY=SuperRandomStringToBeUsedForEncryption
Other key-value pairs:
ADMIN_EMAIL
: set to the default email for your first admin account (default isadmin@idp.com
)ADMIN_PASSWORD
: set to the default password for your first admin account (default ispassword
)DATABASE_URL
: set to a postgresql database url (default isdata-dev.sqlite
)REDISTOGO_URL
: set to Redis To Go URL or any redis server url (default ishttp://localhost:6379
)RAYGUN_APIKEY
: api key for raygun (default isNone
)FLASK_CONFIG
: can bedevelopment
,production
,default
,heroku
,unix
, ortesting
. Most of the time you will usedevelopment
orproduction
.
Note: do not include the .env
file in any commits. This should remain private.
$ pip install -r requirements.txt
You need Redis, and Sass. Chances are, these commands will work:
Sass:
$ gem install sass
Redis:
Mac (using homebrew):
$ brew install redis
Linux:
$ sudo apt-get install redis-server
You will also need to install PostgresQL
Mac (using homebrew):
brew install postgresql
Linux (based on this issue):
sudo apt-get install libpq-dev
$ python manage.py recreate_db
$ python manage.py setup_dev
Note that this will create an admin user with email and password specified by the ADMIN_EMAIL
and ADMIN_PASSWORD
config variables. If not specified, they are both admin@idp.com
and password
respectively.
$ python manage.py add_fake_data
$ source env/bin/activate
$ honcho start -f Local
For Windows users having issues with binding to a redis port locally, refer to this issue.
Before you submit changes, autoformat your code with python manage.py format
.