Travis Build Status
This runs on Python Django. For Development, you'll need Python 3.0 and a virtual environment.
To install the packages required for a successful install on Ubuntu, run
sudo apt-get install python3-dev sudo apt-get install virtualenv sudo apt-get install postgresql postgresql-contrib sudo apt-get install libpq-dev sudo apt-get install libjpeg8-dev
On Mac OS X, run
brew install python3 sudo easy_install pip sudo pip install virtualenv brew update brew install postgres
- Set up your local Virtual environment
virtualenv -p python3 . # setup a new virtual environment locally source bin/activate # enter that environment: needs to happen for every shell session!
- From within the enviroment install the dependencies and do create the folder public/media/avatars
pip install -r requirements.txt mkdir public cd public mkdir media cd media mkdir avatars cd ../../
- (create and) update the database
python manage.py migrate initproc 0009 python manage.py migrate initproc python manage.py migrate initadmin python manage.py migrate
- Set a quorum
python manage.py set_quorum
- Create a super user
python manage.py createsuperuser
- Generate some random initiatives (all in pre-visible state)
python manage.py shell -c "from voty.initproc.helpers import generate_initiative_from_random_wikipedia_article; generate_initiative_from_random_wikipedia_article()"
(Run this multiple times for multiple Initiatives)
- Start the server
python manage.py runserver
- Go to the browser
The server will host the instance at http://localhost:8000/ . The Admin-Interface (you generated an account for in 4) is available at http://localhost:8000/admin/ . Within that just navigate to the "Initiative"(s) and change the state of some of them to make the available and view them in said state.
This server automatically refreshes when you change the python source code or the html templates.
To update the local checkout do:
git pull source bin/activate pip install -r requirements.txt python manage.py migrate
Using docker-compose, right from within this repo, run:
Don't forget to update the database after/within each deploy:
docker-compose exec web bash /code/scripts/upgrade.sh
This project runs on a continuous integration schedule with the premise "master is always live". Meaning that whenever something is pushed to master, this will immediately deployed on abstimmen.bewegung.jetzt and will go live. So, whatever you see here, is what is live.
As for that, pushing and commiting to master is restricted. And usual development should go against the
develop branch where everything ought to be merged before that being merged into
master. But also here we have a continous integration process: everything on
develop will immediately deploy on the testing instance at abstimmen-beta.bewegung.jetzt.
Therefore, any bigger changes are recommended to handle in your own branch outright and merge that against develop, test those on the beta and only then merge and push them on master for real-live deployment.
my-branch --PR-> develop --PR-> master
We're using BrowserStack to test and ensure a consistent rendering of Voty across all modern browsers and mobile devices.
This is released under AGPL-3.0. See the LICENSE-file for the full text.