Overriding module caption names in django admin

customizationdjangodjango-admin

By default, the admin models are grouped by the app, and the app name is in the caption (accounts, auth, etc.). How to override the name in the caption without writing the admin templates?

Best Solution

You can easily doing it through the metadata options app_label and db_table

class model_module1(models.model):
    [...]

    class Meta:
        app_label = "Cool module name"
        db_table = "module1_model"


class model_module2(models.model):
    [...]

    class Meta:
        app_label = "Cool module name"
        db_table = "module2_model"

If you configure tables names correctly you will see how your modules get grouped under the new label in the admin.

Ref: http://docs.djangoproject.com/en/dev/ref/models/options/#app-label