diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-02-23 13:21:07 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-02-23 13:21:07 +0000 |
| commit | a555df4c065c9733e1cd459b31dbb4574501ddf7 (patch) | |
| tree | f5d7f96ebbc640fea39771a087882d5b22cd5c5a /docs/ref/models | |
| parent | c306b78150501086e120f5effc8478924b364352 (diff) | |
Fixed #12837 -- Clarified the naming strategy for m2m intermediate tables. Thanks to Ramiro Morales for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/models')
| -rw-r--r-- | docs/ref/models/fields.txt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 6a98afb005..cd66c468dc 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -331,7 +331,7 @@ otherwise. See :ref:`automatic-primary-key-fields`. A 64 bit integer, much like an :class:`IntegerField` except that it is guaranteed to fit numbers from -9223372036854775808 to 9223372036854775807. The admin represents this as an ``<input type="text">`` (a single-line input). - + ``BooleanField`` ---------------- @@ -772,7 +772,7 @@ A :class:`CharField` for a URL. Has one extra optional argument: If ``True`` (the default), the URL given will be checked for existence (i.e., the URL actually loads and doesn't give a 404 response). - + Note that when you're using the single-threaded development server, validating a URL being served by the same server will hang. This should not be a problem for multithreaded servers. @@ -913,12 +913,13 @@ the model is related. This works exactly the same as it does for Database Representation ~~~~~~~~~~~~~~~~~~~~~~~ -Behind the scenes, Django creates an intermediary join table to represent the -many-to-many relationship. By default, this table name is generated using the -names of the two tables being joined. Since some databases don't support table -names above a certain length, these table names will be automatically -truncated to 64 characters and a uniqueness hash will be used. This means you -might see table names like ``author_books_9cdf4``; this is perfectly normal. +Behind the scenes, Django creates an intermediary join table to +represent the many-to-many relationship. By default, this table name +is generated using the name of the many-to-many field and the model +that contains it. Since some databases don't support table names above +a certain length, these table names will be automatically truncated to +64 characters and a uniqueness hash will be used. This means you might +see table names like ``author_books_9cdf4``; this is perfectly normal. You can manually provide the name of the join table using the :attr:`~ManyToManyField.db_table` option. |
