template actions django-admin

actions - Cómo cambiar la etiqueta del campo de la lista personalizada de Django Admin



django admin add button (1)

Cómo cambiar in_stock verbose_name?

Modelos.py

class Book(models.Model): name = models.CharField(u"Нэр", max_length = 200) @property def in_stock(self): return self.stocks.count()

Im Admin.py

class BookAdmin(admin.ModelAdmin): list_display = (''name'', ''in_stock'') search_fields = (''name'', )


Supongo que deberías usar el atributo short_description. Django-admin

def in_stock(self): return self.stocks.count() in_stock.short_description = ''Your label here''