- Ballot is built using the frappe framework and a basic understanding of it is necessary to contribute to the codebase
- Install and setup frappe-bench.
We recommend using pipx to install
frappe-benchand updating thePATHvariable to include the.../bin/folder inside thepipx-created Python virtual environment forfrappe-bench - Create a new bench with
bench init ballot. We recommend storing benches in a single location e.g.~/frappe-benches - CD into the bench directory i.e.
ballotand clone the Ballot app usingbench get-app https://github.com/harshtandiya/ballot. This will clone the Git repository into theapps/folder in the bench directory - Create a new site
using
bench new-site test.ballot - Install the Ballot app on the new site
bench --site test.ballot install-app ballot - Access the site conveniently
from your computer using
bench --site test.ballot add-to-hosts - Add
"ignore_csrf":1to thesites/common_site_config.jsonconfiguration file. Without this, performing operating on the frontend app raises CSRF errors - Finally, run
bench startto launch the backend
The frappe framework-powered backend application should now be running. To run
the Vue.js-powered frontend application, run yarn dev from the root
directory.
The website can now be accessed from http://test.ballot:8080 and the backend
frappe app can be accessed from http://test.ballot:<port number>.