The Voting Platform of DEMOKRATIE IN BEWEGUNG:
Switch branches/tags
52_prevent_repeated_posting 56_show_comments_on_closed_initiatives_next_try 56_show_comments_on_closed_initiatives 59_abstention 64_tags 81-Abstention-circle-not-centered-in-result-view 86_empty_reason_being_shown_in_summary_of_rejection_reasons 93_d_policychange 93_policy_changes 94-only-board-can-create-policy-change 99-update-help-file 114_filters_deselected 119-unlimited-moderation-comments 121_avatars 133-arguments-dont-count-as-comments 148-team-delegation-models 153-edit-team 154-tags-for-teams 161-my-team-memberships 179_abstimmung 180_policychange_arguments 186_collapse_argument 219_password_reset 222_sync_settings 403branch UI-fixes-around-profile absolute-avatar-url ajax-listing attachments auto-closing-discussion autodeploy beta bewegerinnen-wall bits-and-pieces char-counter count_initiatives data-migration-for-teams-and-permissions develop eligible_voters filled-comment-icon final-edit-phase fix-avatar-cache fix-migrations fix-went-to-discussion-msg fix_voting_feedback gender-informal-copyedit gender-star group-permissions-for-moderation guarding has_voted help-misstates-phase-durations hotfix-134 ignore-eclipse-settings ini-paging json-serializer jump-to-vote magic-search make-debate-usable master messaging moderation_grundgesetz moderator-acks modularize-templates more-html-modularization new-response-model nextstep_and_notifications no-reload-after-discussion-post notify-on-arg percentage-of-eligible-voters prepareInitiative prettify-new-argument publikative self_love_guard show-debate-post-discussion simpler-edit small-fix-1 switch-ci-to-branch team-delegation update-comment-count update-subject-categories upgrade-to-django2.0 user-statistics variants versioning voting_feedback waffleio-labels
Nothing to show
Clone or download
#213 Compare This branch is 786 commits ahead of gnunicorn:master.
joriki Merge pull request #182 from DemokratieInBewegung/develop
long-overdue merge of develop into master
Latest commit 8e04f10 Oct 28, 2018

README.md

Voty - The Voting Platform of DEMOKRATIE IN BEWEGUNG

Travis Build Status

Master

Build Status

Develop

Build Status

Development

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
  1. 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!
  1. From within the enviroment install the dependencies
pip install -r requirements.txt
  1. (create and) update the database
python manage.py migrate
  1. Set a quorum
python manage.py set_quorum
  1. Create a super user
python manage.py createsuperuser
  1. 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)

  1. Start the server
python manage.py runserver
  1. 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.

Happy Hacking!

To update the local checkout do:

git pull
source bin/activate
pip install -r requirements.txt
python manage.py migrate

Deployment

Using docker-compose, right from within this repo, run:

docker compose up

Upgrade database

Don't forget to update the database after/within each deploy:

docker compose exec web bash /code/scripts/upgrade.sh

Deployment cycle

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.

In short:

my-branch --PR-> develop --PR-> master

Frontend Testing

BrowserStack

We're using BrowserStack to test and ensure a consistent rendering of Voty across all modern browsers and mobile devices.

License

This is released under AGPL-3.0. See the LICENSE-file for the full text.