Skip to content

Implement Django Home App with Dynamic Template Rendering, Voting Logic, Todo app

Soheli Paul requested to merge main into master

This Merge Request introduces the following features:

  1. Django Home App:

    • Created a home app with a GET API to display a list of people with their names, ages, and voting eligibility.
  2. 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.
  3. HTML Template:

    • Added index.html under the templates folder.
    • Displays a styled table with the following:
      • Serial number
      • Name
      • Age
      • Voting eligibility (indicated by 👍 or 👎 based on age).
  4. URLs:

    • Configured the following endpoints in urls.py:
      • / (Home page displaying the people table)
      • /success-page/ (Static success page)
  5. Styling:

    • Used Bootstrap CSS for styling the table.
  6. 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.html template.
  • 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.

Edited by Soheli Paul

Merge request reports

Loading