mirror of
https://github.com/django/django.git
synced 2025-10-29 16:46:11 +00:00
Fixed #122 -- BIG, BACKWARDS-INCOMPATIBLE CHANGE. Changed model syntax to use fieldname=FieldClass() syntax. See ModelSyntaxChangeInstructions for important information on how to change your models
git-svn-id: http://code.djangoproject.com/svn/django/trunk@549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -13,10 +13,8 @@ Django provides hooks for executing arbitrary code around ``save()`` and
|
||||
from django.core import meta
|
||||
|
||||
class Person(meta.Model):
|
||||
fields = (
|
||||
meta.CharField('first_name', maxlength=20),
|
||||
meta.CharField('last_name', maxlength=20),
|
||||
)
|
||||
first_name = meta.CharField(maxlength=20)
|
||||
last_name = meta.CharField(maxlength=20)
|
||||
|
||||
def __repr__(self):
|
||||
return "%s %s" % (self.first_name, self.last_name)
|
||||
|
||||
Reference in New Issue
Block a user