Quiz 7 (wk2)

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is the answer to life the universe and everything? plugh BSXSGGC 42 xyzzy iddqd

42

What does the "python manage.py migrate" command do? Makes a backup copy of db.sqlite3 Builds/updates the database structure for the project Moves the application to a new server Moves login sessions to the backing store

Builds/updates the database structure for the project

What does the "sqlmigrate" option accomplish in a Django application? It builds/updates the database structure for the project It lets you see the SQL that will run to effect a migration It moves all of your non-SQL data into flat files It copys all of your SQL in to a REST based API

It lets you see the SQL that will run to effect a migration

What does the __str__ method in a Django model accomplish? It indicates how strict the storage model will be in terms of column length It lets you specfiy how an instance of the model will be represented as a string It improves the strength of the binding between SQL and the model It determines how the model will respond to stress

It lets you specify how an instance of the model will be represented as a string

What is the difference between the Django shell and a normal interactive Python shell? Only the Python shell can print values You can run Django commands in a Python shell The Django shell uses Javascript instead of Python The Django shell loads all of the project objects before starting

The Django shell loads all of the project objects before starting

What is the purpose of the models.py file? To define the shape of the data objects to be stored in a database To make building views for your application simpler To connect your database to the Django addministration interface To apply a regular expression to the incoming path in the request oobect

To define the shape of the data objects to be stored in a database

What file in a Django application do you edit to make sure a model appears in the admin interface? views.py sakaiger.py admin.py module.py

admin.py

What is the django command to reset the password for the admin user? changepassword shell runserver check

changepassword

What is the django command to create a user/password for the admin user interface? INSERT INTO User; createsuperuser //SYSIN DD USER MOVE CORRESPONDING INTO USER

createsuperuser

Which of the following Django commands actually write Python code based on your models.py file? makemigrations check runserver updateschema migrate

makemigrations

Which of the following Django commands actually modify the database schema? makemigrations updateschema check migrate runserver

migrate

What file contains the list of INSTALLED_APPS in a Django project? settings.py views.py apps.py urls.py manage.py

settings.py

These questions come from the Django project tutorial materials. What is the default database backend for Django projects when they are first set up. sqlite3 MongoDB PostgreSQL MySQL Oracle

sqlite3


Set pelajaran terkait

C857 Software Quality Assurance, Overview

View Set

Chapter 3 Physical Science Test: Measurements

View Set

MCB 150 Week 6 topic 1: fates of translated proteins

View Set

Infant/Child Development MIDTERM Chapters 1-4

View Set