Categories
Python Answers

How to give a Python Django app a verbose name for use throughout the admin?

Spread the love

To give a Python Django app a verbose name for use throughout the admin, we can set the verbose_name field in our config.

For instance, we write

from django.apps import AppConfig

class YourAppConfig(AppConfig):
    name = 'yourapp'
    verbose_name = 'Fancy Title'

in apps.py in our Django project to create the YourAppConfig class.

In it, we set the verbose_name field to the verbose name.

And then in our app’s init.py, we add

default_app_config = 'yourapp.apps.YourAppConfig'

to use the config.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *