Django progress

As of yesterday, Django has changed its model syntax. So code that formerly looked like this:

class Comment(meta.Model): 
    fields = (
        meta.TextField('comment', 'comment', maxlength=3000), 
        meta.CharField('headline', 'headline', maxlength=255, blank=True)
    )

will now look like this:

class Comment(meta.Model): 
    comment = meta.TextField(maxlength=3000) 
    headline = meta.CharField(maxlength=255, blank=True) 

Sweet. This brings Django more in line with the Rails philosophy that syntax matters. Making things easier for the developer to type, remember, and read can only bring good things.

This change was also a nice demonstration of 1) the incipient Django community’s energy and smarts, 2) the core Django developers’ willingness to let that community take the wheel, and 3) the benefits of taking the thing public before 1.0 so that good but API-breaking changes like this one can be implemented with minimal pain. Those guys are working hard.

Read the full instructions and watch the screencast to learn more about the change.



Share: