summaryrefslogtreecommitdiff
path: root/docs/forms.txt
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2006-06-19 15:23:57 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2006-06-19 15:23:57 +0000
commitadf4b9311d5d64a2bdd58da50271c121ea22e397 (patch)
treea69b3b023595cf1ce67a14c4c1ecd3290d94088e /docs/forms.txt
parente976ed1f7910fad03704f88853c5c5b36cbab134 (diff)
downloaddjango-attic/multi-auth.tar.gz
multi-auth: Merged to [3151]archive/attic/multi-authattic/multi-auth
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@3152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/forms.txt')
-rw-r--r--docs/forms.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/forms.txt b/docs/forms.txt
index 2f8a3106fc..5026bc1bab 100644
--- a/docs/forms.txt
+++ b/docs/forms.txt
@@ -15,6 +15,8 @@ We'll take a top-down approach to examining Django's form validation framework,
because much of the time you won't need to use the lower-level APIs. Throughout
this document, we'll be working with the following model, a "place" object::
+ from django.db import models
+
PLACE_TYPES = (
(1, 'Bar'),
(2, 'Restaurant'),
@@ -22,13 +24,13 @@ this document, we'll be working with the following model, a "place" object::
(4, 'Secret Hideout'),
)
- class Place(meta.Model):
- 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 Place(models.Model):
+ name = models.CharField(maxlength=100)
+ address = models.CharField(maxlength=100, blank=True)
+ city = models.CharField(maxlength=50, blank=True)
+ state = models.USStateField()
+ zip_code = models.CharField(maxlength=5, blank=True)
+ place_type = models.IntegerField(choices=PLACE_TYPES)
class Admin:
pass