When looking at my database it has the 3rd table for the ManyToMany with
the following:
1. ID auto-generated,
2. Table1.ID
3. Table2.ID.
All fields will be integers.
The 3rd table will be named Table1_Table2 or something like that.
I noticed in your code below that you do not have an ID fie
for many to many relationships between two tables .. you can make a third
table that only contains the id fields ftom both tables , then you can make
a third model for this table
On Fri, 13 Jul 2018, 22:24 , wrote:
> I tried for hours to get django's migrate/makemigrations function work but
> mi
I tried for hours to get django's migrate/makemigrations function work but
miserably couldn't so I created my tables in MySQL. Now I'm trying to add a
ManyToManyField between 2 models but am not sure how the MySQL syntax is
supposed to look like.
This is my current code:
from django.db import
3 matches
Mail list logo