---
title: "Django demo"
description: "Explore a Django ticket checkout built with the Inttegro Python SDK."
canonical: "https://studio.inttegro.com/demos/django"
format: inttegro-machine-docs/v1
language: "cURL"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/curl/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 367
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: []
estimated_tokens: 1175
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Explore a Django ticket checkout built with the Inttegro Python SDK. This cURL representation preserves HTTP paths and JSON wire names.

### Five questions

#### Q1. When should the reader use Django demo?

Use this demo guide to inspect a complete working integration and compare it with the application being built.

#### Q2. What is authoritative on this page?

The demo proves one working composition, not the only supported architecture. Follow its linked SDK and API pages for current contracts.

#### Q3. What page-specific constraint matters most?

Do not copy demo credentials, identifiers, or deployment assumptions. Recreate configuration through supported public setup paths.

#### Q4. Can Inttegro MCP materially help with this task?

No catalog ability is sufficiently specific to recommend for this page. Use the documentation directly; consult the MCP catalog only if the task later requires governed live account context or a supported operation.

#### Q5. How should the reader verify the answer and continue?

Open the hosted experience, trace the corresponding source, and verify that its SDK and API usage still matches the current linked documentation. Continue with [Read the Orders API](https://studio.inttegro.com/machine/curl/api/orders.md) and [Accept payment with Inttegro Checkout](https://studio.inttegro.com/machine/curl/guides/accept-payment-with-inttegro-checkout.md) when those concerns enter scope.

## Document content

# Django demo

Build a Django ticket checkout with embedded, modal, and hosted payment. Django
validates the guest and creates the order on the server.

> Demo Release is interactive content. Use the canonical page to view it.

## What you’ll build

- A [Django 5.2](https://docs.djangoproject.com/en/5.2/) form and view boundary
  for guest ticket checkout
- Typed order construction with the [Inttegro Python SDK](https://studio.inttegro.com/machine/curl/sdks/python.md)
- Non-blocking API calls through `AsyncInttegroClient`
- One ASGI app for containers and Cloudflare Python Workers
- Django Templates progressively enhanced with [`@inttegro/js`](https://studio.inttegro.com/machine/curl/web/javascript.md)
- Safe public errors without exposing API details

## See the flow

The gallery shows one server-created order in all three Checkout presentations.
The API key never reaches the browser.

> Demo Presentation Gallery is interactive content. Use the canonical page to view it.

## Run the demo

Create a [Python virtual environment](https://docs.python.org/3/library/venv.html),
install the requirements, set the environment values, and start Django. The
[released README](https://github.com/inttegro/inttegro-demos/blob/django-v1.8.3/django/README.md)
has the exact commands.

## Key files

1. [`src/checkout/service.py`](https://github.com/inttegro/inttegro-demos/blob/django-v1.8.3/django/src/checkout/service.py)
   creates the order and maps safe errors.
2. [`src/checkout/views.py`](https://github.com/inttegro/inttegro-demos/blob/django-v1.8.3/django/src/checkout/views.py)
   validates the form and returns JSON or a `303` redirect.
3. [`checkout-presentations.js`](https://github.com/inttegro/inttegro-demos/blob/django-v1.8.3/django/src/checkout/static/checkout/checkout-presentations.js)
   presents Checkout in all three modes.
4. [`src/worker.py`](https://github.com/inttegro/inttegro-demos/blob/django-v1.8.3/django/src/worker.py)
   adapts Django to Cloudflare Workers.

## Before you ship

Keep the API key on the server. Store the booking and Inttegro order IDs
together, then verify payment before issuing a ticket.

## Next

- [Browse the released source](https://github.com/inttegro/inttegro-demos/tree/django-v1.8.3/django)
- [Accept payment with Inttegro Checkout](https://studio.inttegro.com/machine/curl/guides/accept-payment-with-inttegro-checkout.md)
- [Read the Orders API](https://studio.inttegro.com/machine/curl/api/orders.md)
