Changes between Initial Version and Version 1 of Ticket #12810


Ignore:
Timestamp:
02/07/2010 02:55:13 PM (10 years ago)
Author:
Alex Gaynor
Comment:

Reformatted, please use preview.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12810 – Description

    initial v1  
    44
    55It is a little bit unclear, cause if db_table is not provided, Django will create table with name based on the name of the model (table that has the ManyToManyField), and field name that contain this ManyToManyField.
    6 
     6{{{
    77class Product(models.Model):
    88 color = models.ManyToManyField('ProductColor', null=True, blank=True)
     
    1414 class Meta:
    1515  db_table = 'eshop_product_color'
    16 
     16}}}
    1717running syncdb
    1818after the creation of 'eshop_product' table Django will create 'eshop_product_color' table that holds relation between Product and ProductColor. The table for ProductColor will never create.
Back to Top