Which one of the following network configurations does NOT need to be provided explicitly to the web framework to establish a connection with an external database such as MySQL?
Port
Database name
Database version
Address
Which of the following tags in the Django template language are relevant to the Template Inheritance? Select all that apply.
csrf_token
extends
static
include
If you run the code below, what will the generated output be for the specified view on the web page?
def home(request): ... return HttpResponse("Hello") return HttpResponse("World")
Hello
Hello World
World
Which of the following are the advantages of using Function-based views?
Code can be extended to include more functionalities.
Code reusability
Use of decorators
Explicit code flow
Which one of the following is NOT a command that can be executed in the command line using the script
manage.py
?shell
showmigrations
settings
runserver
When performing migrations, what is the expected output produced if you run the following query on the command line?
python3 manage.py sqlmigrate
It will show the operations and dependencies performed in migrations.
It will show the SQL queries run during the migrations.
It will run the SQL queries required to perform migrations.
Complete the following sentence. Form validation must ideally occur on ________________
neither the client nor server side, but in the middleware of the web framework.
both the client-side and server-side.
the server-side.
the client-side.
What special character matches zero or more characters while using Regular Expressions?
^ (caret)
# (hash)
* (star)
+ (plus)
Complete the following sentence. Variables are passed from the view to the template by passing them inside the render() function in the form of _______ objects.
tuple
list
dictionary
dynamic
For the declaration of class
MenuTestCase
created for testing, what will be the parameter passed inside it to implement theunittest
package of Python? For example:TestUnit
TestCase
UnitCase
UnitTest