The application is a basic voting application written in python with Flask as the web framework. SQLite is used as the database which will be stored as a file in project structure.
- Jinja2 as template engine.
- Flask-SQLAlchemy as ORM tool.
- Flask-Admin to generate admin page.
- Flask-BasicAuth for authentication on admin page only which is separate from normal user login.
- Flask-WTF for generating forms.
- Werkzeug utility library for password hashing.
Method | Path | Description |
---|---|---|
GET | / or /home | Home Page |
GET | /about | About Page |
GET, POST | /register | User Registration |
GET, POST | /login | User Login |
GET, POST | /dashboard | Voting Dashboard |
POST | /logout | User Logout |
Make sure you have Python 3+, virtualenv and pip installed on your system.
virtualenv voting_env --python=python3
pip install -r requirements.txt
python app.py
The application can now be accessed at http://localhost:5000