summaryrefslogtreecommitdiff
path: root/docs/db-api.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-19 17:20:37 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-19 17:20:37 +0000
commitdf66763406cc76e8d0c65b3a857c891c21c25f49 (patch)
tree0e6e293d8da53eb26fe8ef59678e5750901c970e /docs/db-api.txt
parente243d8287442a65d8c620f5c4f3033aa7d6bbd82 (diff)
Fixed #67 -- Human-readable name is now optional in model fields. If a second positional argument isn't given, Django will use the first argument, converting underscores to spaces. This change is fully backwards-compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/db-api.txt')
-rw-r--r--docs/db-api.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index b01c85b5dd..f6ca07dd83 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -12,18 +12,18 @@ Throughout this reference, we'll refer to the following Poll application::
class Poll(meta.Model):
fields = (
- meta.SlugField('slug', 'slug', unique_for_month='pub_date'),
- meta.CharField('question', 'question', maxlength=255),
- meta.DateTimeField('pub_date', 'date published'),
- meta.DateTimeField('expire_date', 'expiration date'),
+ meta.SlugField('slug', unique_for_month='pub_date'),
+ meta.CharField('question', maxlength=255),
+ meta.DateTimeField('pub_date'),
+ meta.DateTimeField('expire_date'),
)
class Choice(meta.Model):
fields = (
meta.ForeignKey(Poll, edit_inline=True, edit_inline_type=meta.TABULAR,
num_in_admin=10, min_num_in_admin=5),
- meta.CharField('choice', 'choice', maxlength=255, core=True),
- meta.IntegerField('votes', 'votes', editable=False, default=0),
+ meta.CharField('choice', maxlength=255, core=True),
+ meta.IntegerField('votes', editable=False, default=0),
)
Basic lookup functions
@@ -351,6 +351,4 @@ the relation (``poll_id`` in this case).
Deleting objects
================
-Just cause we're crazy like that, the delete method is named ``delete()``.
-Yeah, you never know what we're going to do next.
-
+The delete method, conveniently, is named ``delete()``.