Define Other Models
Let’s continue to create our application. So, we continue to write our Models inside the models.py
file.
Note
An id field is automatically added as a primary key for each model instance. You don't need to declare it explicitly in your models.
We haven't created any relations between our Models yet, but we'll address this shortly.
1. En el modelo Book, deseas agregar tres nuevos campos: 'publishing_date', 'rating' y 'quantity'. ¿Cuál combinación de tipos de campos es la más apropiada para estos campos?
2. What is the primary purpose of the 'str' method in a Django model?
¡Gracias por tus comentarios!
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 3.57
Define Other Models
Desliza para mostrar el menú
Let’s continue to create our application. So, we continue to write our Models inside the models.py
file.
Note
An id field is automatically added as a primary key for each model instance. You don't need to declare it explicitly in your models.
We haven't created any relations between our Models yet, but we'll address this shortly.
1. En el modelo Book, deseas agregar tres nuevos campos: 'publishing_date', 'rating' y 'quantity'. ¿Cuál combinación de tipos de campos es la más apropiada para estos campos?
2. What is the primary purpose of the 'str' method in a Django model?
¡Gracias por tus comentarios!