A simple Django-based community polling application that allows users to create, vote, and manage polls.
- Single Page Application – Smooth navigation and dynamic content loading.
- User Authentication – Sign-up, login, logout, and password management.
- Account Management – Update username, email, and avatar.
- Poll Creation – Authenticated users can create polls with multiple choices.
- Poll Management – Close or delete polls.
- Voting System – One vote per user per poll.
- Poll Lifecycle – Upcoming, active, and completed polls.
- Advanced Filtering – Filter polls by creator, date, and status.
- Mobile Responsive – View polls on mobile devices.
- Timer – Countdown timer for upcoming polls and till poll closes.
- Role-based permissions – Regular users, managers, and admins.
- Docker – Run the app in a container.
git clone https://github.com/mikolajed/CommPolls.git
cd CommPollsWe use Django’s built-in test runner and coverage for detailed reporting.
pip install -r requirements.txtcoverage run --source=comm_polls manage.py test
coverage report -m
coverage html# Unit tests
python manage.py test comm_polls.tests
# Integration tests
python manage.py test comm_polls.integration_testsopen htmlcov/index.html # macOS
xdg-open htmlcov/index.html # LinuxYou can run CommPolls entirely in Docker — no local setup needed.
docker compose up --buildThis will:
- Build the Django app container
- Run the dev server on http://localhost:8000
docker compose exec web python manage.py migratedocker compose exec web python manage.py createsuperuserThen log in at:
http://localhost:8000/admin/
docker compose exec web coverage run --source=comm_polls manage.py test
docker compose exec web coverage report -mCreate a .env file in your project root:
# Django settings
DEBUG=True
SECRET_KEY=your-super-secret-key-for-development-change-for-prod
ALLOWED_HOSTS=localhost,127.0.0.1
# Email backend (optional)
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
# PostgreSQL Database settings
DB_NAME=commpolls_db
DB_USER=commpolls_user
DB_PASSWORD=commpolls_pass
DB_HOST=db
DB_PORT=5432