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.0 (2020-01-27)
gives additional context in get_search_results()
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | decf4059fc27f4d217a4ff1ecf949977ec2ed68a139ac918c21fc5f75d7b1625 |
|
MD5 | bffbd1d311ad686b6ac122c165bc5444 |
|
BLAKE2b-256 | 458103758a98e7337d46b73742d67aaa60646b94e233d2487562df47dec60b97 |
Hashes for django_admin_autocomplete_all-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83d68570739c46bc37d07da7bf871f1224838c8fa09e872b3347a19acb4db06e |
|
MD5 | e813e13311d61d06fc2323eedf8b2656 |
|
BLAKE2b-256 | f59e7a0454e3884b9e5b28721d3947ee7244590e0b39fb9a2cc1d659ed17eea0 |