python Personalizar Admin App Django

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python Personalizar Admin App Django相关的知识,希望对你有一定的参考价值。

# arquivo admin.py do app

from django.contrib import admin
from .models import Perfil
# Register your models here.


class PerfilModelAdmin(admin.ModelAdmin):
    list_display = ["nome", "numero_hosts", "zbx_user"] # Colunas do Admin
    list_display_links = ["zbx_user"] # Link nas Colunas
    search_fields = ["zbx_user", "nome"] # Colunas para busca

    class Meta:
        meta = Perfil


admin.site.register(Perfil, PerfilModelAdmin)

以上是关于python Personalizar Admin App Django的主要内容,如果未能解决你的问题,请参考以下文章

php Personalizar图片e fontes nos pedidos - Woocommerce

PHP Wordpress:funcion para personalizar wp_nav_menu()

python之Django admin总结

Python学习---django之admin简介

Python学习第136天(Django的admin)

python+pycharm+django admin css样式出问题