Home > Software design >  Using models between an App and API app in Django Rest framework
Using models between an App and API app in Django Rest framework

Time:01-11

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?

CodePudding user response:

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

  • Related