Registry / web-framework / djust
library0.9.6rc1pypypi✓ verified 81d ago

djust is a Django library for building reactive, Phoenix LiveView-style components with Rust-powered performance. It enables real-time UI updates over WebSocket without a JavaScript build step. Current version is 0.9.6rc1, with active development and a release cadence of roughly monthly minor releases.

pip install djust
INSTALL
IMPORT
SIG · DJUST
D
djust
web-frameworkpythonv0.9.6rc1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LiveView
from djust import LiveView
from djust.views import LiveView

Minimal LiveView with a counter that increments via a click event.

from django.urls import path from djust.views import LiveView from djust.template import djust_template class CounterView(LiveView): template_name = "counter.html" def mount(self, request, **kwargs): self.context['count'] = 0 async def handle_event(self, event): if event['type'] == 'increment': self.context['count'] += 1 return self.render() urlpatterns = [ path('counter/', CounterView.as_view(), name='counter'), ] # In templates/counter.html: # {% load djust_tags %} # <div dj-root> # <p>Count: {{ count }}</p> # <button dj-on:click="increment">+</button> # </div>
Debug
Known issues
breakingBreaking change in v0.9.5: LiveView.mount() now requires async signature. Previously mount() was synchronous; now it must be async def mount(self, request, **kwargs).
fix
Change def mount(...) to async def mount(self, request, **kwargs) and use await for any async calls.
affects: >=0.9.5
deprecatedThe djust.utils.emit_one_shot_class_warning function is deprecated as of v0.9.5rc2. Use the class-based warning system instead.
fix
Replace calls to emit_one_shot_class_warning with warnings.warn() or a custom warning class.
affects: >=0.9.5rc2
gotchaThe dj-if boundary markers in templates (from v0.9.4) require that the if block body contains at least one element node; otherwise, no markers are emitted, which can break diffing for conditionals that render only text.
fix
Ensure each {% if %} block contains an HTML element (e.g., a <span>) to guarantee marker injection.
affects: >=0.9.4
Upgrade
Version history
0.9.6rc1latest on PyPI
Audit
Dependencies
Djangorequireddjust is built on Django, requiring Django 3.2+
channelsrequiredDjango Channels is used for WebSocket support
Agent activity
30 hits · last 30 days
node
28
OpenAI (training)
1
Resources
djust — pip install djust · libregistry