
Kiến thức về Django
Authored by B22DCCN034 Anh
Information Technology (IT)
8th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong kiến trúc MTV của Django, "M" đại diện cho thành phần nào?
Model, dùng để định nghĩa cấu trúc dữ liệu và tương tác với database.
Migration, dùng để đồng bộ hóa các thay đổi của database.
Method, dùng để định nghĩa các phương thức trong View.
Module, dùng để phân chia các thành phần của ứng dụng.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ORM (Object-Relational Mapper) là một công cụ giúp bạn làm gì?
Tự động tạo giao diện người dùng dựa trên Models.
Tương tác với cơ sở dữ liệu bằng các đối tượng và phương thức Python, không cần viết SQL.
Phân tích mối quan hệ giữa các bảng trong database.
Tự động tạo các file migration.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh nào dùng để quét các thay đổi trong file models.py và tạo ra một file migration mới?
python manage.py migrate
python manage.py makemigrations
django-admin makemigrations
python manage.py createschema
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sau khi đã chạy makemigrations, bạn cần làm gì để áp dụng các thay đổi đó vào database?
python manage.py savechanges
python manage.py update
python manage.py migrate
Khởi động lại máy chủ phát triển.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để định nghĩa một trường lưu trữ chuỗi ký tự ngắn có giới hạn độ dài, bạn sẽ sử dụng loại Field nào?
models.TextField()
models.IntegerField()
models.CharField(max_length=...)
models.StringField()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Mối quan hệ giữa Model Post và Model User (một User có nhiều Post) được định nghĩa bằng loại Field nào trong models.py?
models.OneToOneField
models.ForeignKey
models.ManyToManyField
models.RelationshipField
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong file models.py, một Model phải kế thừa từ lớp nào?
django.db.models.Field
django.db.models.Model
django.views.generic.View
django.db.models.Objects
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?