In Django's tutorial, a models.py class is created named "Question" (singular). It is also registered to be included within the Admin Page using admin.site.register(Question)
(singular)
But then under the Admin Page, it's listed as "Questions" (plural)
Is Django automatically renaming things under the Admin Page to be grammatically satisfying?
Django's Tutorial.. add "Question" to Admin Page
link to png of Admin Page
In the model definition of the Question you can control this by declaring the Meta class:
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Meta(object):
verbose_name_plural = 'Questions'
You can find this here in the docs
As explained in the docs, 'If this isn’t given, Django will use verbose_name + "s".'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With