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/generic_relations/models.py

    r5609 r5803  
    2929 
    3030class Animal(models.Model): 
    31     common_name = models.CharField(maxlength=150) 
    32     latin_name = models.CharField(maxlength=150) 
     31    common_name = models.CharField(max_length=150) 
     32    latin_name = models.CharField(max_length=150) 
    3333     
    3434    tags = generic.GenericRelation(TaggedItem) 
     
    3838         
    3939class Vegetable(models.Model): 
    40     name = models.CharField(maxlength=150) 
     40    name = models.CharField(max_length=150) 
    4141    is_yucky = models.BooleanField(default=True) 
    4242     
     
    4747     
    4848class Mineral(models.Model): 
    49     name = models.CharField(maxlength=150) 
     49    name = models.CharField(max_length=150) 
    5050    hardness = models.PositiveSmallIntegerField() 
    5151