django admin: use select2 (autocomplete_fields) everywhere
Project description
Django admin: Use select2 (autocomplete_fields) everywhere. Implicit is better than explicit. Because it is brief and easy.
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.
Features
1. You can add ‘class Media: js=..’ to get more context in get_search_results. You can also implement better server-side filtering in ajax calls include dynamic filters based on current value of other form fields. Read more in Usage or in source: autocomplete_all/js/autocomplete_params.js
Django admin: 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-admin-autocomplete-all-0.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b555327f178f580de8d0abe11896d00093ad0c4e98b0f8786b51dcb3ec89fc1a |
|
MD5 | fe1f28bc904adfbd0f493cf133632e63 |
|
BLAKE2b-256 | 1061e994e6d5fb609436da8e9626e83c2f4094ef00b3f400c1cd5620d923921a |
Hashes for django_admin_autocomplete_all-0.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd18586c8bf4111e4ee879de66868456b245e7a7c68fc9c76ad257cbe1b1edc4 |
|
MD5 | 095279c924209da4066e14c192e7673f |
|
BLAKE2b-256 | e39156972f6595e9e81eb965c40c24b34bd2b1c7311c365e3fbf80247e4aad04 |