Django

Code

Show
Ignore:
Timestamp:
08/05/07 00:14:46 (1 year ago)
Author:
gwilson
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/modeltests/custom_managers/models.py

    r5609 r5803  
    1919 
    2020class Person(models.Model): 
    21     first_name = models.CharField(maxlength=30) 
    22     last_name = models.CharField(maxlength=30) 
     21    first_name = models.CharField(max_length=30) 
     22    last_name = models.CharField(max_length=30) 
    2323    fun = models.BooleanField() 
    2424    objects = PersonManager() 
     
    3434 
    3535class Book(models.Model): 
    36     title = models.CharField(maxlength=50) 
    37     author = models.CharField(maxlength=30) 
     36    title = models.CharField(max_length=50) 
     37    author = models.CharField(max_length=30) 
    3838    is_published = models.BooleanField() 
    3939    published_objects = PublishedBookManager() 
     
    5050 
    5151class Car(models.Model): 
    52     name = models.CharField(maxlength=10) 
     52    name = models.CharField(max_length=10) 
    5353    mileage = models.IntegerField() 
    5454    top_speed = models.IntegerField(help_text="In miles per hour.")