diff options
| author | Derek Anderson <public@kered.org> | 2007-08-06 16:50:17 +0000 |
|---|---|---|
| committer | Derek Anderson <public@kered.org> | 2007-08-06 16:50:17 +0000 |
| commit | 5aa017255827b2c06bd9a5f7f069828ef625da18 (patch) | |
| tree | 22ec9db537e3eeda5c8e21dbfe35f252a97e375d /docs/contributing.txt | |
| parent | 0af6ed0c4853e11086e277ba352d27db4c466c89 (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/contributing.txt')
| -rw-r--r-- | docs/contributing.txt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/contributing.txt b/docs/contributing.txt index 9dbb865a58..faa4c113f1 100644 --- a/docs/contributing.txt +++ b/docs/contributing.txt @@ -340,14 +340,14 @@ Model style Do this:: class Person(models.Model): - first_name = models.CharField(maxlength=20) - last_name = models.CharField(maxlength=40) + first_name = models.CharField(max_length=20) + last_name = models.CharField(max_length=40) Don't do this:: class Person(models.Model): - FirstName = models.CharField(maxlength=20) - Last_Name = models.CharField(maxlength=40) + FirstName = models.CharField(max_length=20) + Last_Name = models.CharField(max_length=40) * The ``class Meta`` should appear *after* the fields are defined, with a single blank line separating the fields and the class definition. @@ -355,8 +355,8 @@ Model style Do this:: class Person(models.Model): - first_name = models.CharField(maxlength=20) - last_name = models.CharField(maxlength=40) + first_name = models.CharField(max_length=20) + last_name = models.CharField(max_length=40) class Meta: verbose_name_plural = 'people' @@ -364,8 +364,8 @@ Model style Don't do this:: class Person(models.Model): - first_name = models.CharField(maxlength=20) - last_name = models.CharField(maxlength=40) + first_name = models.CharField(max_length=20) + last_name = models.CharField(max_length=40) class Meta: verbose_name_plural = 'people' @@ -375,8 +375,8 @@ Model style class Meta: verbose_name_plural = 'people' - first_name = models.CharField(maxlength=20) - last_name = models.CharField(maxlength=40) + first_name = models.CharField(max_length=20) + last_name = models.CharField(max_length=40) * The order of model inner classes and standard methods should be as follows (noting that these are not all required): |
