#16557: Tutorial 1.0 Docs ---------------------------+------------------------------- Reporter: mike@… | Owner: nobody Type: Uncategorized | Status: new Milestone: | Component: Documentation Version: 1.3 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 0 | Easy pickings: 0 UI/UX: 0 | ---------------------------+------------------------------- I'm somewhat ''new'' to Django and Python in general but have some experience with ORMs.. I'm wondering about the line in https://docs.djangoproject.com/en/1.3/intro/tutorial01/ marked with '***' below:
{{{ from django.db import models class Poll(models.Model): question = models.CharField(max_length=200) ***pub_date = models.DateTimeField('date published') class Choice(models.Model): poll = models.ForeignKey(Poll) choice = models.CharField(max_length=200) votes = models.IntegerField() }}} Why is the argument passed to DateTimeField() 'date published', is that an easy name of the field? When I looked at DateTimeField() documentation at https://docs.djangoproject.com/en/1.3/ref/models/fields/#django.db.models.DateTimeField I see: {{{ class DateTimeField([auto_now=False, auto_now_add=False, **options]) }}} also the generated SQL made no mention of the string "date published" in a comment or otherwise: {{{ BEGIN; CREATE TABLE "polls_poll" ( "id" serial NOT NULL PRIMARY KEY, "question" varchar(200) NOT NULL, "pub_date" timestamp with time zone NOT NULL ); CREATE TABLE "polls_choice" ( "id" serial NOT NULL PRIMARY KEY, "poll_id" integer NOT NULL REFERENCES "polls_poll" ("id"), "choice" varchar(200) NOT NULL, "votes" integer NOT NULL ); COMMIT; }}} I'm not sure what `**options` is so that might be the magic I'm looking for. I'm just saying that as someone looking at these docs for the first time, having `pub_date = models.DateTimeField('date published')` in there is confusing for someone who is trying to get an idea of what the framework is doing. -- Ticket URL: <https://code.djangoproject.com/ticket/16557> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.