mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #2101 -- Renamed maxlength argument to max_length for oldforms FormFields and db model Fields. This is fully backwards compatible at the moment since the legacy maxlength argument is still supported. Using maxlength will, however, issue a PendingDeprecationWarning when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -10,7 +10,7 @@ and a publication has multiple articles.
|
||||
from django.db import models
|
||||
|
||||
class Publication(models.Model):
|
||||
title = models.CharField(maxlength=30)
|
||||
title = models.CharField(max_length=30)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.title
|
||||
@@ -19,7 +19,7 @@ class Publication(models.Model):
|
||||
ordering = ('title',)
|
||||
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(maxlength=100)
|
||||
headline = models.CharField(max_length=100)
|
||||
publications = models.ManyToManyField(Publication)
|
||||
|
||||
def __unicode__(self):
|
||||
|
||||
Reference in New Issue
Block a user