Skip to content

gomesluiz/django-polls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Polls

version

This project is a simple implementation of a polls application based on the Django tutorial.

Overview

The polls application allows users to:

  • Create poll questions.
  • Add answer choices for each question.
  • Vote on poll options.
  • View poll results.

Requirements

  • Python 3.8+
  • Django 5.0

Installation

Follow the steps below to set up and run the application locally.

Clone the Repository

git clone https://github.com/user/django-polls.git
cd django-polls

Create and Activate a Virtual Environment

python -m venv .venv
source .venv/bin/activate  # On Windows, use `.venv\Scripts\activate`

Install Dependencies

pip install -r requirements.txt

Configure the Database

python manage.py migrate

Run the Development Server

python manage.py runserver

Access the application in your browser at http://127.0.0.1:8000/.

Project Structure

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

Features

  • 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.

Contribution

Feel free to contribute with improvements or new features. To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push to the remote repository (git push origin feature/new-feature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License.


For more information about Django, visit the official documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published