Django Global Search enhances the Django Admin experience by enabling a global search across all registered models. This tool respects permissions and existing search fields, allowing for efficient data retrieval from a single interface. Ideal for maintaining usability and control in complex applications.
Django Global Search is an efficient extension designed to enhance the functionality of Django Admin by enabling a comprehensive search across multiple models from a single interface. This tool supports permission handling and adheres to your existing search_fields configurations, streamlining the search experience for administrators.
Key Features
- Unified Search Experience: Perform searches across all registered models without the need to navigate to different sections of the admin interface.
- Permission Respecting: Only display results based on user permissions, ensuring data security and integrity.
- Compatibility: Designed for use with Django 4.2+ and Python 3.9+, making it suitable for contemporary Django applications.
Getting Started
The installation is straightforward, allowing quick integration into any Django project. Simply add it to your INSTALLED_APPS in the settings:
# settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django_global_search', # Position after admin
# ... other apps
]
For a more customized admin experience, advanced configurations can be implemented using a custom admin site class that inherits from the GlobalSearchAdminSiteMixin:
# admin.py
from django.contrib.admin import AdminSite
from django_global_search.admin import GlobalSearchAdminSiteMixin
class MyAdminSite(GlobalSearchAdminSiteMixin, AdminSite):
site_header = "My Custom Admin"
# Replace the default admin site
admin_site = MyAdminSite(name='myadmin')
Interface and Usability
The extension enhances the admin interface by allowing users to see a button for global search in the admin header, making it easily accessible. Search results are well-organized and grouped by application and model, featuring direct links to detailed views and change lists:

Search across all models with permission-based filtering and model selection

Results grouped by app and model with direct links to detail and changelist views
Documentation and Support
Comprehensive documentation is available at Read the Docs, providing detailed instructions and usage examples. For any issues or support, users can report via GitHub Issues or directly via email.
No comments yet.
Sign in to be the first to comment.