Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12837 -- Clarified the naming strategy for m2m intermediate ta…

…bles. 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
  • Loading branch information...
commit a555df4c065c9733e1cd459b31dbb4574501ddf7 1 parent c306b78
Russell Keith-Magee authored

Showing 1 changed file with 9 additions and 8 deletions. Show diff stats Hide diff stats

  1. 17  docs/ref/models/fields.txt
17  docs/ref/models/fields.txt
@@ -331,7 +331,7 @@ otherwise. See :ref:`automatic-primary-key-fields`.
331 331
 A 64 bit integer, much like an :class:`IntegerField` except that it is
332 332
 guaranteed to fit numbers from -9223372036854775808 to 9223372036854775807. The
333 333
 admin represents this as an ``<input type="text">`` (a single-line input).
334  
- 
  334
+
335 335
 
336 336
 ``BooleanField``
337 337
 ----------------
@@ -772,7 +772,7 @@ A :class:`CharField` for a URL. Has one extra optional argument:
772 772
 
773 773
     If ``True`` (the default), the URL given will be checked for existence
774 774
     (i.e., the URL actually loads and doesn't give a 404 response).
775  
-    
  775
+
776 776
     Note that when you're using the single-threaded development server,
777 777
     validating a URL being served by the same server will hang. This should not
778 778
     be a problem for multithreaded servers.
@@ -913,12 +913,13 @@ the model is related. This works exactly the same as it does for
913 913
 Database Representation
914 914
 ~~~~~~~~~~~~~~~~~~~~~~~
915 915
 
916  
-Behind the scenes, Django creates an intermediary join table to represent the
917  
-many-to-many relationship. By default, this table name is generated using the
918  
-names of the two tables being joined. Since some databases don't support table
919  
-names above a certain length, these table names will be automatically
920  
-truncated to 64 characters and a uniqueness hash will be used. This means you
921  
-might see table names like ``author_books_9cdf4``; this is perfectly normal.
  916
+Behind the scenes, Django creates an intermediary join table to
  917
+represent the many-to-many relationship. By default, this table name
  918
+is generated using the name of the many-to-many field and the model
  919
+that contains it. Since some databases don't support table names above
  920
+a certain length, these table names will be automatically truncated to
  921
+64 characters and a uniqueness hash will be used. This means you might
  922
+see table names like ``author_books_9cdf4``; this is perfectly normal.
922 923
 You can manually provide the name of the join table using the
923 924
 :attr:`~ManyToManyField.db_table` option.
924 925
 

0 notes on commit a555df4

Please sign in to comment.
Something went wrong with that request. Please try again.