Common models in django

I'm new to Django and I don't know how to deal with the model sharing problem. For simplicity, let's say we have two applications: A1, A2, and one model M1. Now I would like A1 and A2 to use the same M1 model. I can probably put M1 inside A1 and A2, but that's not a good idea. How to deal with this?

+3


source to share


1 answer


define M1

in your application A1

or A2

and use this in another application models.py

:



from A1.models import M1

      

-1


source







All Articles