{"id":27699,"library":"djust","title":"djust","description":"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.","status":"active","version":"0.9.6rc1","language":"python","source_language":"en","source_url":"https://github.com/djust-org/djust","tags":["django","liveview","reactive","websocket","rust","phoenix"],"install":[{"cmd":"pip install djust","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"djust is built on Django, requiring Django 3.2+","package":"Django","optional":false},{"reason":"Django Channels is used for WebSocket support","package":"channels","optional":false}],"imports":[{"note":"LiveView is located in the djust.views module, not the top-level package.","wrong":"from djust import LiveView","symbol":"LiveView","correct":"from djust.views import LiveView"}],"quickstart":{"code":"from django.urls import path\nfrom djust.views import LiveView\nfrom djust.template import djust_template\n\nclass CounterView(LiveView):\n    template_name = \"counter.html\"\n\n    def mount(self, request, **kwargs):\n        self.context['count'] = 0\n\n    async def handle_event(self, event):\n        if event['type'] == 'increment':\n            self.context['count'] += 1\n            return self.render()\n\nurlpatterns = [\n    path('counter/', CounterView.as_view(), name='counter'),\n]\n\n# In templates/counter.html:\n# {% load djust_tags %}\n# <div dj-root>\n#   <p>Count: {{ count }}</p>\n#   <button dj-on:click=\"increment\">+</button>\n# </div>","lang":"python","description":"Minimal LiveView with a counter that increments via a click event."},"warnings":[{"fix":"Change def mount(...) to async def mount(self, request, **kwargs) and use await for any async calls.","message":"Breaking 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).","severity":"breaking","affected_versions":">=0.9.5"},{"fix":"Replace calls to emit_one_shot_class_warning with warnings.warn() or a custom warning class.","message":"The djust.utils.emit_one_shot_class_warning function is deprecated as of v0.9.5rc2. Use the class-based warning system instead.","severity":"deprecated","affected_versions":">=0.9.5rc2"},{"fix":"Ensure each {% if %} block contains an HTML element (e.g., a <span>) to guarantee marker injection.","message":"The 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.","severity":"gotcha","affected_versions":">=0.9.4"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with 'pip install djust' and ensure you're using the correct import path (e.g., 'from djust.views import LiveView').","cause":"djust is not installed or the package name is misspelled.","error":"ModuleNotFoundError: No module named 'djust'"},{"fix":"Use 'from djust.views import LiveView' instead of 'from djust import LiveView'.","cause":"Imported LiveView from the wrong module. LiveView is in djust.views, not the top-level package.","error":"AttributeError: module 'djust' has no attribute 'LiveView'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}