summaryrefslogtreecommitdiff
path: root/docs/tutorial01.txt
diff options
context:
space:
mode:
authorDerek Anderson <public@kered.org>2007-08-06 16:50:17 +0000
committerDerek Anderson <public@kered.org>2007-08-06 16:50:17 +0000
commit5aa017255827b2c06bd9a5f7f069828ef625da18 (patch)
tree22ec9db537e3eeda5c8e21dbfe35f252a97e375d /docs/tutorial01.txt
parent0af6ed0c4853e11086e277ba352d27db4c466c89 (diff)
schema-evolution: update from HEAD (v5821)
git-svn-id: http://code.djangoproject.com/svn/django/branches/schema-evolution@5822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/tutorial01.txt')
-rw-r--r--docs/tutorial01.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt
index 180e30292d..32480ca487 100644
--- a/docs/tutorial01.txt
+++ b/docs/tutorial01.txt
@@ -251,12 +251,12 @@ These concepts are represented by simple Python classes. Edit the
from django.db import models
class Poll(models.Model):
- question = models.CharField(maxlength=200)
+ question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
poll = models.ForeignKey(Poll)
- choice = models.CharField(maxlength=200)
+ choice = models.CharField(max_length=200)
votes = models.IntegerField()
The code is straightforward. Each model is represented by a class that
@@ -279,7 +279,7 @@ name for ``Poll.pub_date``. For all other fields in this model, the field's
machine-readable name will suffice as its human-readable name.
Some ``Field`` classes have required elements. ``CharField``, for example,
-requires that you give it a ``maxlength``. That's used not only in the database
+requires that you give it a ``max_length``. That's used not only in the database
schema, but in validation, as we'll soon see.
Finally, note a relationship is defined, using ``models.ForeignKey``. That tells