What is the meaning of string argument in django model's Field?
django, django-models, models, python
Solution
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}]
Problem
Just learning django, I'm reading this tutorial and getting confused at this part: ``` class Question(models.Model): pub_date = models.DateTimeField('date published') ``` Having searching its documentation, still can't figure out what does `'date published'` argument mean? Anyone can explain?