FreedomSponsors uses a few python libs that I could never get to work properly on Windows or Mac. That means you need linux to get FS running on your machine.
You can get Ubuntu VMs for VirtualBox here.
Alternatively, you can run FS in sandbox mode (no database, good enough to work with html/css/js only)
If you have trouble following the instructions here, we have videos to help :-)
https://www.youtube.com/watch?v=Z0e_GNaPA-8&list=PLgMNBa0XaIgd4hpofUDaeyRNKMUlSfZde
Instructions to run application locally:
- Install Postgresql and some other needed libs
$ sudo apt-get update --fix-missing
$ sudo apt-get install postgresql postgresql-server-dev-all \
python-dev python-lxml libxslt-dev libpq-dev pgadmin3 \
libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev \
liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
# see http://stackoverflow.com/questions/34631806/fail-during-installation-of-pillow-python-module-in-linux
- Clone the repo.
$ git clone git://github.com/freedomsponsors/www.freedomsponsors.org.git
$ cd www.freedomsponsors.org
- Create the database/default user.
$ sudo su postgres #run the next command as postgres
$ createuser -d -SRP frespo # this will prompt you to create a password (just use frespo for now)
$ createdb -O frespo frespo
$ exit # go back to your normal user
- Create a virtualenv and install dependencies.
$ python bootstrap
This will create a python virtualenv and install all dependecies listed on requirements.txt
on it.
If this command fails because of psycopg2, make sure you have installed postgresql-server-dev-all (mentioned on step 1)
Then you can activate the virtualenv:
$ source bin/activate
To deactivate the virtualenv
$ deactivate
Remember: You'll need to be in the virtual environment to use ./manage.py ...
commands
- Create database objects.
$ cd djangoproject
$ ./manage.py syncdb --migrate --noinput
- Run!
$ ./manage.py runserver # and visit http://localhost:8000
Next: