Skip to content
Projects

jobic10/e-voting-with-django

View on GitHub

About

The Voting System web application using Django is a project that serves as the automated voting system of an organization or school. This system works like the common manual system of election voting system whereas this system must be populated by the list of the positions, candidates, and voters. This system can help a certain organization or school to minimize the voting time duration because aside they can provide the voters an online platform to vote, the system will automatically count the votes for each candidate. The system has 2 sides of the user interface which are the administrator and voters side. The admin user is in charge to populate and manage the data of the system and the voter side which is where the voters will choose their candidate and submit their votes.

Web & App Development

How these counts are measured

What you can do

  • Result tally via Horizontal Bar Chart
  • Print voting results in PDF
  • Changeable order of positions to show in the ballot
  • CRUD candidates

Measured star growth

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

E - Voting Created Using Django

This E - Voting System Was Developed With Django(Python Framework). Feel free to make changes based on your requirements.

If you like this project, then ADD a STAR ⭐️ to this project 👆

This Voting System web application built using Django can serve as the automated voting system for organizations and/or institutions. The system works like the common election manual system of voting whereas the system must be populated by the list of the positions, candidates, and voters. The E-voting system can help a certain organization or school to minimize the voting time duration because aside providing the voters an online platform to vote, the system will automatically count the votes for each candidate. The system has 2 sides of the user interface which are the administrator and voters side. The admin user is in charge to populate and manage the data of the system and the voter side which is where the voters will choose their candidate and submit their votes.

Front-end Template

Features:

  • Vote preview
  • Multiple votes
  • Result tally via Horizontal Bar Chart
  • Print voting results in PDF
  • Changeable order of positions to show in the ballot
  • CRUD voters
  • CRUD candidates
  • CRUD positions
  • Plugins
  • AdminLTE Template

A. Admin Users Can

  1. See Overall Summary Charts of Votes
  2. Reset Votes
  3. Manage Voters (CRUD)
  4. Manage Candidates (CRUD)
  5. Manage Positions (CRUD)
  6. Change Ballot Style (Ballot Position)
  7. Update/Change Ballot Title

B. Voters Can

  1. Register
  2. Login
  3. Verify with OTP (This can be overwritten in settings.py file)
  4. Votes for their favourite candidates
  5. View candidates they voted for

📸 ScreenShots

The beautiful MDN logo.
Database Design
Admin Voter
------- ------ ------ ------
------- ------ ------ ------
------- ------ ------ ------
------- ------ ------ ------

Running tests

$  DJANGO_DEBUG=True python manage.py test

PDF printing uses WeasyPrint, which needs Pango installed on the system (e.g. brew install pango or apt install libpango-1.0-0). The PDF test is skipped when Pango is not available.

Support Developer

  1. Add a Star 🌟 to this 👆 Repository
  2. Follow on Twitter/Github

Passport/Images

Images are from Unsplash

Pre-Requisites:

  1. Install Git Version Control [ https://git-scm.com/ ]

  2. Install Python Latest Version [ https://www.python.org/downloads/ ]

  3. Install Pip (Package Manager) [ https://pip.pypa.io/en/stable/installing/ ]

Alternative to Pip is Homebrew

Installation

1. Create a Folder where you want to save the project

2. Create a Virtual Environment and Activate

Install Virtual Environment First

$  pip install virtualenv

Create Virtual Environment

For Windows

$  python -m venv venv

For Mac

$  python3 -m venv venv

For Linux

$  virtualenv .

Activate Virtual Environment

For Windows

$  source venv/scripts/activate

For Mac

$  source venv/bin/activate

For Linux

$  source bin/activate

3. Clone this project

$  git clone https://github.com/jobic10/e-voting-with-django.git

Then, Enter the project

$  cd e-voting-with-django

4. Install Requirements from 'requirements.txt'

$  pip3 install -r requirements.txt

5. Configure environment variables

The project reads its secrets and flags from the environment:

Variable Default Purpose
DJANGO_SECRET_KEY (required unless DJANGO_DEBUG=True) Django secret key
DJANGO_DEBUG False Set to True for local development only
DJANGO_ALLOWED_HOSTS localhost,127.0.0.1 when debugging Comma separated host names
DJANGO_CSRF_TRUSTED_ORIGINS (empty) e.g. https://vote.example.com
DJANGO_SECURE_SSL_REDIRECT, DJANGO_HSTS_SECONDS, DJANGO_BEHIND_PROXY off HTTPS hardening in production
SEND_OTP True Set to False to skip SMS OTP verification
SMS_EMAIL, SMS_PASSWORD (empty) Multitexter credentials used to send OTPs
ALLOW_VOTER_REGISTRATION True Set to False to close voter self-registration

For local development:

$  export DJANGO_DEBUG=True SEND_OTP=False

6. Run migrations python manage.py migrate

Migrations are now committed to the repository. If you created your own migrations before, delete the local account/migrations/0001_*.py and voting/migrations/0001_*.py files and run python manage.py migrate --fake-initial against your existing database.

7. Now Run Server

Command for PC:

$ python manage.py runserver

Command for Mac:

$ python3 manage.py runserver

Command for Linux:

$ python3 manage.py runserver

8. Login Credentials

Create Super User (HOD) Command for PC:

$  python manage.py createsuperuser

Command for Mac:

$  python3 manage.py createsuperuser

Command for Linux:

$  python3 manage.py createsuperuser

Then Add Email and Password

or Use Default Credentials

For HOD /SuperAdmin Email: [email protected] Password: admin

For Staff Email: [email protected] Password: staff

For Student Email: [email protected] Password: student

For Sponsor or Projects Enquiry

  1. Email - [email protected]
  2. LinkedIn - jobic10
  3. Twitter - jobic10

How the system works

Administrator is required to have created candidates. Before creating candidates, the admin must have created positions After doing this, the voters can vote (provided that they are registered and verified)

How do voters get verified ?

OTP is sent to voter's phone. In a case of OTP delivery error, voter can request for OTP again. The OTP is sent via an SMS gateway. Voters can request for OTP for a maximum of three times. Same OTP is sent to voters

Can OTP verification be bypassed ?

Yeah, sure. Open settings.py and toggle SEND_OTP to False Then, wait till server restarts

Open to contribution ?

Yeah. Pull requests are welcomed.

Having any issue using this ?

Please, let us know. Open up an issue.

Explore related projects

Loading…