View function
A view function is a web request handler associated with a route that receives a request and returns an HTTP response.
Django in Action
A Django view is a function or class that receives an HTTP request and returns an HTTP response.
- How it is used
- Connects visited URLs to code that generates browser pages or API data.
- How deep it goes
- Defines function-based view inputs and outputs, then works through plain-text and ORM-backed rendering without class-based view internals.
- Examples
- Uses a plain-text credits page and a musician listing ordered by last name.
- What you can do after
- Build it from scratch as a request-taking function, register it with a URL path, and return content to a browser.
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
A view function is a Flask request-handler function that processes a web request and returns a response or rendered page.
- How it is used
- Routes browser requests to rendered pages and prediction-processing actions in a Flask web deployment.
- How deep it goes
- Explains routing, template rendering, query parsing, type conversion, model invocation, and result display, while deferring robust bin calculation.
- Examples
- Uses home.html and show-prediction.html handlers for a property-price prediction form with categorical and continuous fields.
- What you can do after
- Apply it via Flask to render pages, collect request inputs, call a loaded Keras model, and display predictions.
Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains view function →
Related concepts
- Django ORMuses · Django ORM is Django's integrated object-relational mapping system for defining models and querying and persisting relational data through Python objects.
- login_requiredconfigured by · login_required is a web-framework decorator that restricts a view or route to authenticated users and redirects unauthenticated requests to a login page.
- path objectconfigured by · A Django path object represents a URL pattern and the view reference associated with that pattern.
- HTMXused by · HTMX is a JavaScript library that enables HTML attributes to initiate HTTP interactions, handle events, and update portions of a page.
- endpointincludes · An endpoint is a network-accessible address or interface through which a service exposes a resource or operation and handles requests and responses.
- renderused by · The Django render shortcut creates an HTTP response by loading a template, combining it with context data, and rendering the result.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

