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

    r5609 r5803  
    1414 
    1515class Reporter(models.Model): 
    16     first_name = models.CharField(maxlength=30) 
    17     last_name = models.CharField(maxlength=30) 
     16    first_name = models.CharField(max_length=30) 
     17    last_name = models.CharField(max_length=30) 
    1818 
    1919    def __unicode__(self): 
     
    2121 
    2222class Article(models.Model): 
    23     headline = models.CharField(maxlength=100) 
     23    headline = models.CharField(max_length=100) 
    2424    pub_date = models.DateField() 
    2525 
     
    3030    reporter = models.ForeignKey(Reporter) 
    3131    article = models.ForeignKey(Article) 
    32     position = models.CharField(maxlength=100) 
     32    position = models.CharField(max_length=100) 
    3333 
    3434    def __unicode__(self):