This is a question in the django ManyToMany field.

Asked 2 years ago, Updated 2 years ago, 51 views

Hi, everyone. Django relational model question.

class Actress(models, model):
    Actress = models.CharField(max_length=30)


class Movielist(models.Model):
    title = models.CharField(max_length=30)
    cast = models.CharField(max_length=300)

Among the two models above, we want to make the action field and the cast field many-to-many.

However, the data of the cast field is stored in one column. (ex: Won Bin, Lee Na-young, Cho Jin-woong)

In this case, is it possible to map the data of the cast field in one column and the Actress field to many to many?

I wonder what to do if possible.

django python

2022-09-22 20:34

1 Answers

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.