Implement Django Home App with Dynamic Template Rendering, Voting Logic, Todo app
This Merge Request introduces the following features:
-
Django Home App:
- Created a
homeapp with a GET API to display a list of people with their names, ages, and voting eligibility.
- Created a
-
View Functions:
-
home: Displays a table of people with their names, ages, and a column indicating whether they can vote. -
success_page: A simple success page with a static message.
-
-
HTML Template:
- Added
index.htmlunder thetemplatesfolder. - Displays a styled table with the following:
- Serial number
- Name
- Age
- Voting eligibility (indicated by
👍 or👎 based on age).
- Added
-
URLs:
- Configured the following endpoints in
urls.py:-
/(Home page displaying the people table) -
/success-page/(Static success page)
-
- Configured the following endpoints in
-
Styling:
- Used Bootstrap CSS for styling the table.
-
Database Setup:
- Configured SQLite3 as the database.
- Performed CRUD operations using migrations and the Django shell.
Testing:
- Tested the GET API locally.
- Verified that the data is rendered correctly in the
index.htmltemplate. - Ensured proper conditional formatting (red background for non-voters and voting eligibility icons).
This MR sets up the basic structure for the project and demonstrates the initial functionality of the Django app.
Recent Updates
Created a new Django app for managing tasks (ToDo).
Key Features:
Task Creation: Users can add tasks by specifying a title and details. Task Removal: Tasks can be deleted via a dedicated remove button. Simple UI: A clean interface using Bootstrap for responsive design. Message Notifications: Alerts are displayed when tasks are removed.
Technologies Used:
Backend: Django (Python) Frontend: HTML, CSS, Bootstrap Database: SQLite (Django's default database) Libraries: django-crispy-forms for handling form rendering
###Development Steps: Project Setup: Initialized a Django project and created an app for task management. Database Models: Defined a Todo model with fields like title, details, and date. Views & Forms: Created views for displaying tasks and a form for submitting new tasks. User Interface: Designed a Bootstrap-powered interface for task management. Database Migrations: Applied migrations to set up the database. Server Setup: Ran the development server locally for testing.