About 666,000 results
Open links in new tab
  1. Writing views | Django documentation

    First, we import the class HttpResponse from the django.http module, along with Python’s datetime library. Next, we define a function called current_datetime. This is the view function. Each view …

  2. Views In Django - GeeksforGeeks

    Nov 25, 2025 · In Django’s MVT architecture, views handle user requests and return responses. They act as a bridge between models (data) and templates (UI), deciding what the user sees in the browser.

  3. Django Views - W3Schools

    Django views are Python functions that take http requests and return http response, like HTML documents. A web page that uses Django is full of views with different tasks and missions.

  4. Loopwerk: How I write Django views

    Aug 28, 2025 · When learning Django, one of the first major forks in the road is how to write your views. Django gives you two main options: simple functions or powerful classes.

  5. django view (controller) - Django Organization

    Django’s views are the information brokers of a Django application. A view sources data from your database (or an external data source or service) and delivers it to a template.

  6. An Introduction to Django Views | The PyCharm Blog

    Jan 29, 2025 · What are Django views? Views are a core component of Django’s MTV (model-template-view) architecture pattern. They essentially act as middlemen between models and templates, …

  7. How to use Django views - Hostinger

    May 22, 2025 · Learn about Django views, including function-based and class-based views, with examples and best practices to optimize your web application.

  8. Views in Django - codingtag.com

    Explore the concept of Views in Django and understand how they handle web requests and return responses. This guide covers both function-based and class-based views, explaining how to …

  9. Django Views - A Comprehensive Guide to Generic and Class-Based Views

    Nov 21, 2024 · In this tutorial, we will delve into the world of Django Views, focusing on Generic Views and Class-Based Views. We will explore their concepts, implementation, best practices, and tips for …

  10. Built-in Views | Django documentation

    Django comes with a few views by default for handling HTTP errors. To override these with your own custom views, see Customizing error views. When you raise Http404 from within a view, Django …