A Django App that highlights selected rows on the admin UI.
Project description
django-highlightselect-model-admin
Description
A Django App that highlights selected rows on the admin UI.
Usage
in settings.py
INSTALLED_APPS = [
...
'highlightselect_model_admin',
...
]
collect statics
python manage.py collectstatic
in admin.py
from highlightselect_model_admin import HighLightSelectModelAdmin
from .model import MyModel
@admin.register(MyModel)
class MyModelAdmin(HighLightSelectModelAdmin):
"""
Inherit from HighLightSelectModelAdmin insead of django.contrib.admin.ModelAdmin
"""
...
action = ('my_action', )
def my_action(self, request, queryset):
selected_ids = []
for q in queryset:
selected_ids.append(q.id)
self.highlight_message_user(request, 'Selected!', selected_ids)
Issues
https://github.com/laonan/django-highlightselect-model-admin/issues
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
File details
Details for the file django-highlightselect-model-admin-1.0.0.tar.gz
.
File metadata
- Download URL: django-highlightselect-model-admin-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9400ae79cc93ce2d69c23612fe3f6dac4285a022020240e9583850064993270d |
|
MD5 | 1cc38beab036f50f6b2af942770b5c91 |
|
BLAKE2b-256 | b53b045800a24d47460a8e0671ea809df414ca631df5ec94aeb271987e9b49f9 |
File details
Details for the file django_highlightselect_model_admin-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_highlightselect_model_admin-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e564d0bdf084e6cf02e526c936f1f5d4aaa825bed4d415b1ede55a91af3e6bdf |
|
MD5 | a935c1f7da3b8c1e62863ae59f2315ae |
|
BLAKE2b-256 | 561f5a06d73219824d9dff56154476553a948ac990664766b6dc82fcb7b999ee |