Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
django-changelist-toolbar-admin
Advanced tools
Provides custom button management function on changelist page of django admin site.
Provides custom button management function on changelist page of django admin site.
pip install django-changelist-toolbar-admin
pro/settings.py
INSTALLED_APPS = [
...
'django_static_fontawesome',
'django_changelist_toolbar_admin',
...
]
app/admin.py
from django.contrib import admin
from django_changelist_toolbar_admin.admin import DjangoChangelistToolbarAdmin
from .models import Category
class CategoryAdmin(DjangoChangelistToolbarAdmin, admin.ModelAdmin):
list_display = ["name"]
search_fields = ["name"]
django_changelist_toolbar_buttons = [
"export_button",
"say_hi_button",
]
def export_button(self, request):
return "/export"
export_button.title = "Export"
export_button.icon = "fas fa-file-export"
export_button.target = "_blank"
def say_hi_button(self, request):
return {
"href": "javascript:alert('hi');",
"title": "Say Hi",
"icon": "fas fa-music",
}
admin.site.register(Category, CategoryAdmin)
make_changelist_toolbar_button
get return the final buttons.changelist_toolbar_buttons
to django_changelist_toolbar_buttons
.FAQs
Provides custom button management function on changelist page of django admin site.
We found that django-changelist-toolbar-admin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.