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/docs/forms.txt

    r5609 r5803  
    3838 
    3939    class Place(models.Model): 
    40         name = models.CharField(maxlength=100) 
    41         address = models.CharField(maxlength=100, blank=True) 
    42         city = models.CharField(maxlength=50, blank=True) 
     40        name = models.CharField(max_length=100) 
     41        address = models.CharField(max_length=100, blank=True) 
     42        city = models.CharField(max_length=50, blank=True) 
    4343        state = models.USStateField() 
    44         zip_code = models.CharField(maxlength=5, blank=True) 
     44        zip_code = models.CharField(max_length=5, blank=True) 
    4545        place_type = models.IntegerField(choices=PLACE_TYPES) 
    4646 
     
    389389            self.fields = ( 
    390390                forms.EmailField(field_name="from", is_required=True), 
    391                 forms.TextField(field_name="subject", length=30, maxlength=200, is_required=True), 
     391                forms.TextField(field_name="subject", length=30, max_length=200, is_required=True), 
    392392                forms.SelectField(field_name="urgency", choices=urgency_choices), 
    393393                forms.LargeTextField(field_name="contents", is_required=True),