Categorized: Database, Django

Pluralization of Database Models in Django

Part of the “magic-removal” was apparently removing automatic pluralization. That’s a shame. That’s one thing I really dig about Rails.

In your models.py file:

class Meta:
    verbose_name_plural = 'something'

So for a ‘Person’ model, you could put ‘people’. Now it will look right in the admin interface.

Comments

Nothing to see here yet. Start things off, why don't you?

What do you think about that?

Elsewhere in the empire: Home, Blog, APOD