The use of model field "verbose name"

user3599803 picture user3599803 · Mar 30, 2016 · Viewed 8.3k times · Source

If I have a web app that use only one language and it is not English, is that correct to use model field verbose_name attribute for the field description (that will be printed in form)? I dont use the translation modules.

Answer

Akshay Katiha picture Akshay Katiha · Jan 4, 2019

Verbose Field Names are optional. They are used if you want to make your model attribute more readable, there is no need to define verbose name if your field attribute is easily understandable. If not defined, django automatically creates it using field's attribute name. Ex : student_name = models.CharField(max_length=30) In this example, it is understood that we are going to store Student's name, so no need to define verbose explicitly.

Ex : name = models.CharField(max_length=30)

In this example, one may be confused what to store - name of student or Teacher. So, we can define a verbose name.

name = models.CharField("student name",max_length=30)