I try to build a website where online elections can be conducted. I build this site using django framework.
This is a side project I build to test my Django skills.
- Only authenticated voters/citizens can register in the system and vote.
- Voters can vote only one time.
- Only one election can be conducted at a time by Admin.
- Admins and voters of that particular region can see history of all elections conducted and their winners.
- There is Message on voters dashboard of the current state of election.
- Frontend :
- HTML
- CSS
- JavaScript
- Backend :
- Django
git clone https://github.com/akshay782/online_voting_system.git
python manage.py migrate
python manage.py makemigrations
Now before running this project into browser we have to set some Regions and Admins for that regions. For that we have to create superuser so that we access Django Admin Dashboard.
Run the following command -
python manage.py createsuperuser
Set a username and password
Now, go to http://127.0.0.1:8000/admin
and fill the login form
First open Regions model and set some regions and second open Admins model and set admins for that regions.
Now we are all set for running the project 👍
At this point you can access only admin side of project like login as an admin(we set in Admins models), creating elections etc.
Go to http://127.0.0.1:8000/
on your browser and you can login as a admin
For login as voter I already set some citizens data on citizens_data folder. You can login as those but I will suggest to add your own citizens with dummy info and their regions same as you set in Regions model. Now we can register and login as voter that we created in citizens.csv file.
Finally all setup is completed 😊
Run the following command -
python manage.py runserver
Go to http://127.0.0.1:8000/
git add .
git commit -m "message"
git push origin <branch-name>