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
Close
Hashes for django-highlightselect-model-admin-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9400ae79cc93ce2d69c23612fe3f6dac4285a022020240e9583850064993270d |
|
MD5 | 1cc38beab036f50f6b2af942770b5c91 |
|
BLAKE2b-256 | b53b045800a24d47460a8e0671ea809df414ca631df5ec94aeb271987e9b49f9 |
Close
Hashes for django_highlightselect_model_admin-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e564d0bdf084e6cf02e526c936f1f5d4aaa825bed4d415b1ede55a91af3e6bdf |
|
MD5 | a935c1f7da3b8c1e62863ae59f2315ae |
|
BLAKE2b-256 | 561f5a06d73219824d9dff56154476553a948ac990664766b6dc82fcb7b999ee |