Using models between an App and API app in Django Rest framework

190 Views Asked by At

I'm going to create API with Django Rest Framework for an existing Django project. I would like to use models of existing app (product/models.py) in 'API/models.py'. Will that work smoothly as of using models across multiple apps using from product.models import item,...

After importing I'll be creating serializers.py .

Can anyone answer me whether this will work?

1

There are 1 best solutions below

0
Maz On BEST ANSWER

Yes, this works, we can import and use models of other apps in this way.