Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Admin Site appending letter "s" to end of each model\table name on Django

I tried the verbose name when registering it on my admin.py so that it would appear as Data instead of Datas but that did not work.

admin.site.register(Data, verbose_name="Data")

Any ideas?

like image 817
BluePython Avatar asked Sep 06 '13 13:09

BluePython


1 Answers

You should be setting verbose_name_plural in that case. Docs here.

Also you should be setting it on the model's Meta options of your model (docs here). Example:

class MyModel(models.Model):
    # my fields

    class Meta:
        verbose_name_plural = "PluralForMyModel"
like image 185
Joseph Victor Zammit Avatar answered Oct 04 '22 18:10

Joseph Victor Zammit