From 31f4787b8dfa4a966b4203cf71d24a320e3257b0 Mon Sep 17 00:00:00 2001 From: Andy Venet Date: Mon, 5 Jan 2015 13:17:34 -0300 Subject: [PATCH] Add max_length attribute to person CharField The tutorial as-is, because the max_length attribute for the CharField is required for validating the model in Django. I'm proposing with this change setting it to 200 characters, as it's done in other parts of the tutorial. --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index c4cdc8a..89eca77 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,7 +33,7 @@ We're going to run through creating a tutorial app. Let's start with a simple mo # tutorial/models.py class Person(models.Model): - name = models.CharField(verbose_name="full name") + name = models.CharField(verbose_name="full name", max_length=200) Add some data so you have something to display in the table. Now write a view to pass a ``Person`` queryset into a template::