This is a question from the design side of Django.

Asked 2 years ago, Updated 2 years ago, 46 views

There are many things I don't know because it's my first time making a web page. So I also ask the design side. We are making a membership model and making an application model. By the way, I have a question.

A member named A is writing a homepage where the manager adds additional content or modifies the writing. But I have a question while I was doing it.

I'm not sure if you need to use a connection model (OneToOneField..) to connect the first membership model and the writing model, or if you need to create a name and company name object in the writing model as in the example in JangoGirls and save the data in the membership.

django

2022-09-22 21:38

1 Answers

Is there only one article that member A can write? Then use OneToOneField.

However, if a member named A can write several articles, you should write ForeignKey.


2022-09-22 21:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.