Skip to main content

A Django admin app to search by specific field instead of all fields

Project description

Django Admin SBF is a Django admin app to customise the default search functionality to search by specific field instead of all the fields. This helps in reducing the SQL query overload when there are too much data to process and multiple fields to search from.

Detailed documentation is in the “docs” directory.

Quick start

  1. Install

pip install django-admin-sbf
  1. Add “django_admin_sbf” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'django_admin_sbf',
    ]
  2. Extent the admin class for any model using DjangoAdminSBF instead of ModelAdmin

  3. Define search_fields same as Django default.

Screenshots

Django admin sbf

Example

@admin.register(Education)
class EducationAdmin(DjangoAdminSBF):

    search_fields = [
        'course',
        'subject
    ]

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-admin-sbf-0.5.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

django_admin_sbf-0.5-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

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