My Blog

My WordPress Blog

My Blog

My WordPress Blog

Day: September 24, 2024

Update Data

Django ORM uses the Active Record pattern for the interaction between a model class and its mapped database table. An instance of the model class corresponds to a single row in the table. Any of the attributes of the object results in updating the corresponding row. In this chapter, we will focus on the different […]

Insert Data

Django has its own Object Relation Model (ORM) that maps a Python class with a table in a relational database. The ORM mechanism helps in performing CRUD operations in object-oriented manner. In this chapter, we shall learn about different methods of inserting a new data. By default, Django uses a SQLite database. A model in […]

Models

A model is a class that represents table or collection in our DB, and where every attribute of the class is a field of the table or collection. Models are defined in the app/models.py (in our example: myapp/models.py) Creating a Model Following is a Dreamreal model created as an example − Every model inherits from […]

Scroll to top