django model get field verbose name

from django.db import models

class YourModel(models.Model):
    your_field = models.CharField(max_length=255, verbose_name="Your Verbose Name")
  1. Import the models module from Django.

  2. Define a Django model class named YourModel by inheriting from models.Model.

  3. Inside the model class, define a field named your_field using the CharField class from models. Adjust the field's parameters as needed, such as max_length in this example.

  4. Use the verbose_name parameter within the field definition to set a human-readable name for the field. In this example, the verbose name is set to "Your Verbose Name".