Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 3.27 KB

File metadata and controls

101 lines (68 loc) · 3.27 KB

🍪 Django Cookies Management Demo

A simple Django web application demonstrating how to use HTTP cookies to persist user data across multiple views. This project shows how to maintain state in a stateless protocol like HTTP using browser cookies.


Python Django Status

A simple Django web application demonstrating how to use HTTP cookies to persist user data across multiple pages.

This project is designed for beginners to understand how cookies work and how they help maintain state in a stateless HTTP environment.


🔥 Features

  • Multi-step form flow (Name → Age → Course → Result)
  • Cookie-based data persistence across views
  • Beginner-friendly Django project structure
  • Debugging support using request.COOKIES
  • Demonstrates HTTP statelessness and state management

🧠 How It Works (Project Flow)

The application collects user data step-by-step and stores it in cookies:

  • Home Page (home_view)

    • Entry point of the application
    • Collects user name
  • Age Page (age_view)

    • Reads name from GET request
    • Stores name in browser cookies
    • Displays age input form
  • Course Page (course_view)

    • Retrieves name from cookies
    • Stores age in cookies
    • Displays course selection form
  • Result Page (result_view)

    • Retrieves name and age from cookies
    • Reads course from GET request
    • Displays final result

🔑 Django Cookie Methods

  • request.COOKIES → Read cookies from browser
  • response.set_cookie() → Store data in browser cookies

🔄 Project Flow

Home → Age → Course → Result


🛠️ Tech Stack

  • Backend:
      

  • Frontend:


🤝 Connect with Me

Agar aapke paas koi sawal hai ya aap connect karna chahte hain, toh aap mujhe niche diye gaye platforms par reach out kar sakte hain:
If you have any questions or would like to connect, feel free to reach out to me on the platforms below:"

  • LinkedIn:
    LinkedIn

  • Gmail:
    Gmail

💖 Support & Usage

If you find this project helpful or plan to use it as a template for your learning, please consider:

  1. Giving it a Star ⭐
  2. Giving credit to the original author

📌 Note

This project is created for learning purposes to understand how HTTP cookies work in Django.
It is not intended for production use. In real-world applications, Django sessions or secure authentication systems are recommended for handling user data.