What is Django ORM?

ORM which is also known as the object relation model enables us to interact with our database. It allows us to add, delete, change, and query objects (Object Relational Mapper). Django uses a database abstraction API called ORM to interface Viewed with its database models, to use Django object relation Models, we must first have a project and an app running. Models can be created in app/models.py after an app has been started. The Django ORM may be accessed by running the following command in our project directory.

python manage.py shell

This opens a Python console where we may add objects, retrieve objects, modify existing items, and delete objects. 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *