Skip to main content

djust-admin

A modern, reactive Django admin interface powered by djust.

Status: Pre-Alpha - This project is in early development. APIs may change.

Features

  • Real-time search - Filter results as you type with debounced queries
  • Live sorting - Click columns to sort without page reload
  • Bulk actions - Select multiple items and perform actions
  • Instant feedback - Form validation and save feedback in real-time
  • Modern UI - Clean, responsive design with Tailwind CSS
  • Django compatible - Works with existing Django models and permissions

Installation

pip install djust-admin

Quick Start

1. Add to INSTALLED_APPS

INSTALLED_APPS = [
    # ...
    'djust',
    'djust_admin',
    # ...
]

2. Create admin configuration

# myapp/admin.py
from djust_admin import DjustModelAdmin, site

from .models import Article, Author

@site.register(Article)
class ArticleAdmin(DjustModelAdmin):
    list_display = ['title', 'author', 'published_date', 'status']
    list_filter = ['status', 'author']
    search_fields = ['title', 'content']
    ordering = ['-published_date']

@site.register(Author)
class AuthorAdmin(DjustModelAdmin):
    list_display = ['name', 'email', 'article_count']
    search_fields = ['name', 'email']

    def article_count(self, obj):
        return obj.articles.count()
    article_count.short_description = "Articles"

3. Add URLs

# urls.py
from django.urls import path, include
from djust_admin import site

urlpatterns = [
    # ... your other urls
    path('djust-admin/', include(site.urls)),
]

4. Configure ASGI (for WebSocket support)

# asgi.py
from django.core.asgi import get_asgi_application
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from djust.websocket import LiveViewConsumer
from django.urls import path

application = ProtocolTypeRouter({
    "http": get_asgi_application(),
    "websocket": AuthMiddlewareStack(
        URLRouter([
            path('ws/live/', LiveViewConsumer.as_asgi()),
        ])
    ),
})

Configuration

DjustModelAdmin Options

class MyModelAdmin(DjustModelAdmin):
    # List view
    list_display = ['field1', 'field2']      # Fields to show in list
    list_filter = ['status', 'created_at']   # Filter sidebar
    search_fields = ['title', 'content']     # Searchable fields
    list_per_page = 25                       # Items per page
    ordering = ['-created_at']               # Default ordering

    # Detail view
    fields = ['field1', 'field2']            # Fields to show in form
    readonly_fields = ['created_at']         # Non-editable fields
    fieldsets = [                            # Group fields
        ('Basic Info', {'fields': ['title', 'slug']}),
        ('Content', {'fields': ['body']}),
    ]

    # Actions
    actions = ['publish', 'archive']         # Bulk actions

    def publish(self, request, queryset):
        queryset.update(status='published')
    publish.short_description = "Publish selected"

Custom Admin Site

from djust_admin import DjustAdminSite

class MyAdminSite(DjustAdminSite):
    site_header = "My Company Admin"
    site_title = "Admin Portal"
    index_title = "Welcome to the Admin"

admin_site = MyAdminSite(name='myadmin')

Comparison with Django Admin

Feature Django Admin djust-admin
Page reloads for actions Yes No (WebSocket)
Search On submit Real-time
Sorting Page reload Instant
Form validation On submit Real-time
Bulk selection Checkbox + submit Live state
JavaScript required ~150KB ~5KB

Roadmap

v0.1.0 (Current)

  • Basic model list view with search/sort/pagination
  • Model detail/edit view with form validation
  • Delete confirmation
  • Bulk actions (delete)
  • Filter sidebar

v0.2.0

  • Inline related objects
  • Foreign key autocomplete
  • File upload support
  • Custom actions with confirmation

v0.3.0

  • Dashboard widgets
  • Activity log
  • User preferences
  • Themes

Contributing

Contributions are welcome! Please see CONTRIBUTING.md.

License

MIT License - see LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djust_admin-0.3.0.tar.gz (155.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djust_admin-0.3.0-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file djust_admin-0.3.0.tar.gz.

File metadata

  • Download URL: djust_admin-0.3.0.tar.gz
  • Upload date:
  • Size: 155.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for djust_admin-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ab1f9823039bb495b703c61bac5a104312f84832d5966f913ed814871f7c59fe
MD5 d34db85ac44c8d90e8d5cc8ad4ae8f9b
BLAKE2b-256 395e9d3ae7cfc90ea102e9d32c3ad8003e6f0b12dc7d768fdba9b98a541f8f04

See more details on using hashes here.

Provenance

The following attestation bundles were made for djust_admin-0.3.0.tar.gz:

Publisher: publish.yml on djust-org/djust-admin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file djust_admin-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: djust_admin-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for djust_admin-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd9acdcb6e30b622f5855fbae7309181408be91a8c25d60fd3dd0102a92ea01b
MD5 8b0eb15b4a3475ab226a9faf85eb541e
BLAKE2b-256 a8401c282430d52e9a5166cbf7b19a7779ec6de249ad3d2cc10393d25cd0ab21

See more details on using hashes here.

Provenance

The following attestation bundles were made for djust_admin-0.3.0-py3-none-any.whl:

Publisher: publish.yml on djust-org/djust-admin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page