Skip to main content

Global search for Django Admin, search across all registered models with permissions and search_fields support

Project description

Django Global Search

PyPI Download Test codecov PyPI Python Versions Supported Django versions

A global search extension for Django Admin that allows searching across multiple models from a single page. Search through all registered models with permission handling and respect for existing search_fields configurations.

Documentation can be found at https://django-global-search.readthedocs.io/

Installation

Install using pip:

pip install django-global-search

Or using uv:

uv add django-global-search

Usage

Setup

# settings.py
INSTALLED_APPS = [
    'django.contrib.admin',
    'django_global_search',  # Add after admin
    # ... other apps
]

Adding a Navigation Button (Optional)

{% extends "admin/base_site.html" %}

{% block userlinks %}
    {{ block.super }}
    {% include 'global_search/button.html' %}
{% endblock %}

This adds a convenient "Global Search" button in the admin header.

Advanced Setup

If you're using a custom admin site class, you can explicitly inherit from the mixin:

# 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')

Screenshots

Global Search Interface

Global Search Interface

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

Search Results

Search Results

Results grouped by app and model with direct links to detail and changelist views

Requirements

  • Python 3.9+
  • Django 4.2+

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Project details


Download files

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

Source Distribution

django_global_search-0.1.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

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

django_global_search-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file django_global_search-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django_global_search-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89666e234f1982e822e7cdbca48c2da39e2cbc886ee4a0eafff359d26f84b291
MD5 3070a4b4de4c7aaf744efd021a7f3f06
BLAKE2b-256 c1ce8d0d73820455bbeb8aa0abdc74e214bc0e464a5629071591b7e4771b04d3

See more details on using hashes here.

File details

Details for the file django_global_search-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_global_search-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0195114820e2e4d50de43f95780e07695c025320ba21921ec3285936b59ebc3
MD5 887abacfd0ba4a69c05080054208f4a2
BLAKE2b-256 d0af19851011dea87471b314a800094ff46247b038ca7ca1be96ce54699ed21d

See more details on using hashes here.

Supported by

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