mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #2101 -- Renamed maxlength
argument to max_length
for oldforms FormField
s and db model Field
s. 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:
parent
973f44aa4c
commit
212ee65be7
88 changed files with 647 additions and 407 deletions
|
@ -10,7 +10,7 @@ Set ``related_name`` to designate what the reverse relationship is called.
|
|||
from django.db import models
|
||||
|
||||
class Person(models.Model):
|
||||
full_name = models.CharField(maxlength=20)
|
||||
full_name = models.CharField(max_length=20)
|
||||
mother = models.ForeignKey('self', null=True, related_name='mothers_child_set')
|
||||
father = models.ForeignKey('self', null=True, related_name='fathers_child_set')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue