diff --git a/README.md b/README.md index 9c14a34..5ff59f1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,16 @@ Install with command `pip install django-admin-global-search`. ### Usage To use `django-admin-global-search` in your Django project, you need to update your models and URL configurations. -1. Add `admin_global_search` to your `INSTALLED_APPS` setting. +1. Add `admin_global_search` to your `INSTALLED_APPS` setting before `django.contrib.admin`. +```python +INSTALLED_APPS = [ + "admin_global_search", + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + ... +] +``` 2. Ensure your models have a `global_search_fields` attribute that specifies the fields to be included in the search. Example: ```python class Artist(models.Model): diff --git a/dev/dev/settings.py b/dev/dev/settings.py index 88ba726..3993268 100644 --- a/dev/dev/settings.py +++ b/dev/dev/settings.py @@ -31,6 +31,7 @@ # Application definition INSTALLED_APPS = [ + "admin_global_search", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -38,7 +39,6 @@ "django.contrib.messages", "django.contrib.staticfiles", "music", - "admin_global_search", ] MIDDLEWARE = [ diff --git a/pyproject.toml b/pyproject.toml index 596e40e..ccb7531 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "django-admin-global-search" -version = "0.0.1" +version = "0.0.2" description = "A global search for Django Admin UI" authors = ["Stanislav Filin "] license = "BSD 3-Clause License"