Sunteți pe pagina 1din 3

Select the incorrect statement.

None

A Django app will contain ALL

Choose the correct option to create a project myworld using the django-admin command.$ $ django-
admin startproject myworld

Choose the correct option to create an app ‘myapp’.python manage.py startapp myapp

Which setting can be used while adding a new Django app?INSTALLED_APPS

Select the incorrect statement: Django ORM.Supports SQLite only

What is the equivalent Django ORM query in a Python code for the following?SELECT * FROM
CUSTOMER WHERE name='fresco play'

customer = Customers.objects.filter(name='fresco play')

Object-relational Mapper (ORM) is a code library to automate the data transfer between
_______.Relational DB and Objects

Identify the ORM most used for Flask Web Framework.SQLAlchemy

When choosing field names for the model, it should not conflict with the model API. The field name
should not be _________.clean, save and delete

To rename the Manager for a given class, what attribute type can be used in models.Manager() on that
model?class

id- is the auto assigned primary key by Django with the datatype.models.AutoField()

A Django model is a Python class that subclasses _________.django.db.models.Model

What are the different ways of connecting multiple models relationship?All

When an object is saved, Django _____________.all the options

What can be used to provide custom model validation and to modify attributes on the model like
changing the value on a field upon a conditional check?Model.clean()

What can be used to validate all model fields, if any field is to be exempted from validation? Provide it in
the exclude parameter.Model.clean_fields(exclude=None)

What exception is an attribute of each model class?DoesNotExist

What can be used to validate all unique constraints on the model instead of individual field values?
Model.validate_unique(exclude=None)

Django is loaded with a database-abstraction API to ______. All

Select the incorrect statement about A QuerySet.Incomparable to a database select operation.

Select the incorrect statement: QuerySet API are classified as _________.All

Table names in databases are created by default with app_classname.T

exclude(**kwargs) - Returns QuerySet containing objects matching given lookup parameters.F

Schema Migrations-run custom SQL using RunSQL or python code blocks using RunPython.F

Datamigrations _________.All

Migrations are stored as _______.migration files

How to make a migration run outside transaction in a DDL based transaction?class


Migration(migrations.Migration):

atomic = False

Select the incorrect statement: Migration Operations ________.

migrations aren't automatically done based on history of model changes.

The integrity of Django ORM operations involving multiple queries can be achieved through savepoints.T

What exception is raised, if the primary key is excluded from a Raw query?

InvalidQuery exception
Select the incorrect statement: Database Transaction ________.is started by enabling autocommit using
set_autocommit()

Select the incorrect statement: A database Router uses the method ________.

db_for_delete(model, **hints).

Which creates a new savepoint and returns the savepoint ID (SID)?

Identify the incorrect option: Method that returns a new queryset.earliest()

savepoint(using=None)

Which is not an aggregation function?range

filter(**kwargs) - Returns QuerySet containing objects that do not match the given lookup parameters.F

Name the incorrect field option.None

Name the incorrect field type.none of the options

Identify the incorrect option: Method that does not return a new queryset.difference()

What do you call a migration that creates the first version of the app’s tables initial migration

What is not a related objects reference method?save

Identify the incorrect field lookup option.none

Name the comparison and conversion database functions.All

S-ar putea să vă placă și