[Django]-Two Django Apps using Same Database Table

3👍

If you declare a table in two separate apps within the django project you will have two separate tables. What you want to do is declare the model in the app where it makes the most sense and then import the model from the second app.

For example:

#app2.views

from app1.models import MyModel

Like this you will be referencing the same table from both locations and you won’t have any weird situation in which you look for data and you don’t find it.

Leave a comment