# -*- coding: utf-8 -*-
from django.contrib import admin
from rosmorport_tsts.models import TbPetsClones


@admin.register(TbPetsClones)
class AdminTbPetsClones(admin.ModelAdmin):
    search_fields = ['szPetName', 'szPetSerNum', 'szPetOwner']
    list_display = ['szPetName', 'szPetSerNum', 'szPetOwner', 'szPetPrice', 'dtPetCreate']
    list_display_links = ('szPetName', 'szPetSerNum')
    list_filter = ('iPetType', 'iPetSex', 'bPetIsAlive')
    empty_value_display = '<b style=\'color:red;\'>—//—</b>'
    actions_on_top = False
    actions_on_bottom = False

    def has_delete_permission(self, request, obj=None):
        # запрет кнопки "удалить" в админке
        return False
