What is the meaning of string argument in django model's Field?
Because this feature is hard to find in the documentation, I think it's better practice to explicitly use the verbose_name argument, e.g.
class Question(models.Model):
pub_date = models.DateTimeField(verbose_name='date published')
From that exact tutorial page you linked to, about three paragraphs down:
You can use an optional first positional argument to a Field to designate a human-readable name. That’s used in a couple of introspective parts of Django, and it doubles as documentation.
Well here is an example of what human-readable name means.
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('Enter published date')
So in our admin panel we see our pub_date feild name as Enter published date.
But if you try to fetch data from database you will see the feild name as pub_date.
>>> data_dict = Question.objects.all().values()
>>> data_dict
[{'question_text': u'What is Python?', 'pub_date': datetime.datetime(2014, 11, 22, 12, 23, 42, tzinfo=<UTC>), u'id': 1}]