Skip to content

Commit

Permalink
feat: change dev project and README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislav Filin <[email protected]>
  • Loading branch information
stasfilin committed Feb 10, 2024
1 parent 7c4f476 commit babe207
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion dev/dev/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
# Application definition

INSTALLED_APPS = [
"admin_global_search",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"music",
"admin_global_search",
]

MIDDLEWARE = [
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "BSD 3-Clause License"
Expand Down

0 comments on commit babe207

Please sign in to comment.