This project is a simple implementation of a polls application based on the Django tutorial.
The polls application allows users to:
- Create poll questions.
- Add answer choices for each question.
- Vote on poll options.
- View poll results.
- Python 3.8+
- Django 5.0
Follow the steps below to set up and run the application locally.
git clone https://github.com/user/django-polls.git
cd django-polls
python -m venv .venv
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
Access the application in your browser at http://127.0.0.1:8000/
.
polls-app/
├── django_project/ # Main project directory
│ ├── __init__.py
│ ├── settings.py # Django settings
│ ├── urls.py # Project URLs
│ ├── wsgi.py
│ └── asgi.py
├── polls/ # Polls application directory
│ ├── __init__.py
│ ├── admin.py # Admin configuration
│ ├── apps.py
│ ├── migrations/ # Database migrations
│ ├── models.py # Database models
│ ├── tests.py # Automated tests
│ ├── urls.py # Polls application URLs
│ └── views.py # View logic
├── manage.py # Django management script
└── requirements.txt # Project dependencies list
- Admin Interface: Administrative interface to manage polls and choices.
- Poll Creation: Allows creating new poll questions with multiple answer choices.
- Voting: Users can vote on a poll option.
- Results Viewing: Voting results are updated in real-time.
Feel free to contribute with improvements or new features. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push to the remote repository (
git push origin feature/new-feature
). - Open a Pull Request.
This project is licensed under the MIT License.
For more information about Django, visit the official documentation.