summaryrefslogtreecommitdiff
path: root/docs/forms.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-08-25 22:51:30 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-08-25 22:51:30 +0000
commit25264c86048d442a4885dfebae94510e2fa0c1e4 (patch)
treebb02799b624fb0d6f931d208509ffbb50d00e358 /docs/forms.txt
parentaec0a73d73324820c767758afd250fc21a2896ef (diff)
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
Diffstat (limited to 'docs/forms.txt')
-rw-r--r--docs/forms.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/forms.txt b/docs/forms.txt
index 5e2ddcdeed..e3a98feb32 100644
--- a/docs/forms.txt
+++ b/docs/forms.txt
@@ -26,14 +26,14 @@ this document, we'll be working with the following model, a "place" object::
)
class Place(meta.Model):
- fields = (
- meta.CharField('name', maxlength=100),
- meta.CharField('address', maxlength=100, blank=True),
- meta.CharField('city', maxlength=50, blank=True),
- meta.USStateField('state'),
- meta.CharField('zip_code', maxlength=5, blank=True),
- meta.IntegerField('place_type', choices=PLACE_TYPES)
- )
+ name = meta.CharField(maxlength=100),
+ address = meta.CharField(maxlength=100, blank=True),
+ city = meta.CharField(maxlength=50, blank=True),
+ state = meta.USStateField(),
+ zip_code = meta.CharField(maxlength=5, blank=True),
+ place_type = meta.IntegerField(choices=PLACE_TYPES)
+ class META:
+ admin = meta.Admin()
def __repr__(self):
return self.name