Skip to main content
https://badge.fury.io/py/django-admin-autocomplete-all.svg https://travis-ci.org/pyutil/django-admin-autocomplete-all.svg?branch=master https://codecov.io/gh/pyutil/django-admin-autocomplete-all/branch/master/graph/badge.svg

Django admin: 1) Get more context for filtering in get_search_results, 2) use select2 (autocomplete_fields) everywhere (because implicit is better than explicit).

Documentation

The full documentation is at https://django-admin-autocomplete-all.readthedocs.io.

Quickstart

Install django-admin-autocomplete-all:

pip install django-admin-autocomplete-all

Add ‘autocomplete_all’ into INSTALLED_APPS, then collectstatic (both not required if you don’t play with get_search_results filtering.)

Features

  1. Get more context in get_search_results. Implement filtering into get_search_results of target ModelAdmin and add this to the source ModelAdmin:

class MyModelAdmin(ModelAdmin):
    class Media:
        js = ('autocomplete_all/js/autocomplete_params.js',)

You can also implement dynamic filters based on current value of other form fields. See Usage for details or read in source code: autocomplete_all/js/autocomplete_params.js

  1. Use select2 (autocomplete_fields) everywhere.

In your admin.py import ModelAdmin, StackedInline and/or TabularInline ‘from autocomplete_all’ instead of ‘from admin’.

import autocomplete_all
class MyModelAdmin(autocomplete_all.ModelAdmin):
    ....

Running Tests

Does the code actually work? /N/A while we haven’t the 1st test yet./

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.2.4 (2020-01-27)

  • gives additional context in get_search_results()

  • Fix: missing .js (in 0.2.0-0.2.3)

0.1.6 (2020-01-24)

  • Fix in docs: proper attribute name is: autocomplete_except

0.1.4 (2020-01-22)

  • First acceptable version.

Metadata

Release files for django-admin-autocomplete-all 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-admin-autocomplete-all 0.2.5
File Size Uploaded
django-admin-autocomplete-all-0.2.5.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-admin-autocomplete-all 0.2.5
File Interpreter ABI Platform
django_admin_autocomplete_all-0.2.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.3 kB

Release files / django-admin-autocomplete-all-0.2.5.tar.gz

Download URL django-admin-autocomplete-all-0.2.5.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f1c0943b3a3bce80b8dc83d6afac0271f49c81d9c1a120f60fa3345a86a9d07c
BLAKE2b-256 checksum
How to use checksums
f8e23e1b5079e28fef84b4779e5a17720bc81080a322c2195e8410e0e92be5dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5rc1

Release files / django_admin_autocomplete_all-0.2.5-py2.py3-none-any.whl

Download URL django_admin_autocomplete_all-0.2.5-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0dbeb29227c63477c98808363672c67ba3bda165836b0487006c8c4ff974dc67
BLAKE2b-256 checksum
How to use checksums
8c9990fe6297ae17fa3ed8296b6bb5bcc700c20a538ccb5a68bbbfd7bdf37e98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5rc1

Release history Release notifications | RSS feed

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page