Official package · Frameworks

Realtime Django admin: who’s online, edit locks and live change lists

One app in INSTALLED_APPS and one middleware make the Django admin multiplayer: see who else is online and on the same page, lock a record while one person edits it, and watch change lists update themselves. Works with the stock admin and django-unfold, with no template changes.

PyPI versionLicense

Fastest way: one prompt with the Hibira plugin

Install the plugin in your AI coding agent and paste the prompt. The agent signs you in, creates a free app if you need one, writes the code and sends a test event. GitHub ↗

  1. Install the plugin

    claude plugin marketplace add hibira-io/agent-plugin
    claude plugin install hibira@hibira
  2. Paste this prompt

    Add Hibira Django admin (django-hibira) to this project.
    Follow https://hibira.io/guides/django-admin, adapted to how this project is already set up.
    If I have no Hibira app yet, create a Free one that allows http://localhost so I can test right away.
    Keep the app key and secret in environment variables, add placeholders to .env.example, and never commit real values or send the secret to a browser.
    When you are done, send a test event, show me it arriving, and list the files you changed.

Prefer to do it by hand? These are the steps below:

  1. Install
  2. Set it up
  3. Use it

Other AI tools and what the plugin includes →

  • Who’s online next to the user menu, and avatars of everyone else on the same page.
  • Edit locks: the first person on a change form edits it, and everyone else sees who and can’t save over them until they leave. No lock table and no polling.
  • Change lists refresh in place when rows are added, saved or deleted anywhere (the admin, an API, a Celery task or the shell), and a change form says when its record was saved elsewhere.
  • notify(user, "...") shows a toast on every admin page that user has open. Django 4.2 to 6.1, with the stock admin or django-unfold.
An edit lock in the Django admin: Mei Lin is editing the product, so Ken’s form is read-only until she leaves, with an Edit anyway button.
An edit lock in the Django admin: Mei Lin is editing the product, so Ken’s form is read-only until she leaves, with an Edit anyway button.

Sign in to see these snippets with your own cluster host. Sign in

  1. Install

    pip install "django-hibira>=0.5"
    
    HIBIRA_APP_ID=YOUR_APP_ID
    HIBIRA_APP_KEY=YOUR_APP_KEY
    HIBIRA_APP_SECRET=YOUR_APP_SECRET
    HIBIRA_HOST=ws.hibira.io
    
    python manage.py hibira_check
  2. Set it up

    # settings.py
    INSTALLED_APPS = [
        # ...
        "django.contrib.admin",
        "django_hibira",
        "django_hibira.live_admin",
    ]
    
    MIDDLEWARE = [
        # ...
        "django.contrib.auth.middleware.AuthenticationMiddleware",
        "django_hibira.live_admin.middleware.LiveAdminMiddleware",
    ]
    
    # urls.py
    urlpatterns += [path("hibira/", include("django_hibira.urls"))]
    The same edit lock in django-unfold.
    The same edit lock in django-unfold.
  3. Use it

    from django_hibira.live_admin import changed, notify
    
    # A toast on every admin page the user has open
    notify(order.assignee, f"Order {order.number} was paid", title="Orders",
           level="success", url=f"/admin/shop/order/{order.pk}/change/")
    
    # Bulk updates send no signals: refresh open change lists yourself
    Order.objects.filter(status="new").update(status="paid")
    changed(Order)
    The product change list right after a colleague saved a product: it refreshed by itself and the changed row is highlighted.
    The product change list right after a colleague saved a product: it refreshed by itself and the changed row is highlighted.

Before you start

  • The app secret is shown only once, when you create the app or rotate its secret. Keep it on your server, never in a browser or game build.
  • On the Free plan, list every origin your pages load from in the app’s allowed origins (http://localhost:8000 while developing, then your domain). "*" needs a paid plan.
  • Each open admin tab is one connection, so the Free plan’s 100 connections cover most admin teams.
  • Bulk changes such as QuerySet.update() send no model signals: call changed(Model) afterwards so open change lists refresh.

Frequently asked questions

Does it work with django-unfold?

Yes. The middleware adds its scripts to every admin page instead of overriding templates, so the stock admin, django-unfold and most admin themes work unchanged.

Do I need Django Channels or Redis?

No. Your app stays a normal WSGI app: browsers connect to Hibira, and saves are sent to it after the transaction commits.

Use the app key from your dashboard; the secret stays on your server. Channels, events and authorization endpoints work exactly as they do with Pusher. Create your free account →