Start here.Build something live.
Your Django skills. A reactive interface. Go from your first live view to a complete application, one guide at a time.
On this page
djust is Django with reactive templates. Your view's state lives in Python on the server. When it changes, djust re-renders the template and patches only the changed parts of the DOM over a WebSocket. You write Python; there is no JavaScript to write and no build step to run.
Keep these close
- Template cheat sheet Event bindings, template syntax, and common patterns in one place.
- Themes & styling Choose a theme, customize tokens, and match your brand.
- Browse guides by topic Find a guide or worked tutorial for your next feature.
- API and directive reference Check exact names, options, and examples.
The whole thing
A working live counter. Two files.
# myapp/views.py
from djust import LiveView
from djust.decorators import event_handler
class CounterView(LiveView):
template_name = "myapp/counter.html"
def mount(self, request, **kwargs):
self.count = 0
def get_context_data(self, **kwargs):
return {"count": self.count}
@event_handler()
def increment(self, **kwargs):
self.count += 1
<!-- myapp/templates/myapp/counter.html -->
{% load live_tags %}
<!DOCTYPE html>
<html>
<head>{% djust_client_config %}</head>
<body>
<div dj-root>
<h1>Count: {{ count }}</h1>
<button dj-click="increment">+1</button>
</div>
</body>
</html>
That is the entire feature. Clicking the button sends an event over the
WebSocket, djust calls increment(), re-renders in Rust, and patches the one
text node that changed.
What you did not have to do
- No
npm install, no bundler, nonode_modules - No REST or GraphQL endpoint, no serializers, no client-side state store
- No second language for the UI, and no API contract to keep in sync
- No full-page reload
The path
Three pages, in order, and you will have the model:
- Install and configure djust — a pip install and three settings.
- Build your first LiveView — the counter above, with the parts explained.
- Core concepts — why the template is on the server, what happens on each event, and what "state" means here.
Then pick a door
- What do you want to do? — find the page for the task in front of you. Best if you already know what you are building.
- Learn — the guided build path, one feature at a time.
- Look up — reference for LiveView, decorators, components and testing.
Just evaluating?
Skip the path. The counter above is the whole architecture, so there is
nothing hidden behind it. For scope, skim the
template cheat sheet — every dj-
directive on one page — and security for the
things handled for you rather than by you.