Django Web Framework - Module Quiz: Introduction to Django


Which of the following are some of the differences between the commands
django-admin
andmanage.py
? Select all that apply.There is no difference between django-admin and manage.py.
django-admin is a command-line utility and manage.py is a Python script.
manage.py is more convenient to use than django-admin.
django-admin is installed in the Python environment when you install Django with PIP utility. The manage.py file is created inside each Django project folder.
The
urls.py
file is present in the project package and the app package.True
False
What happens when the view function created inside the
views.py
file is modified while the development server is still running?The development server will automatically reload and changes will reflect on webpage reload.
The development server will terminate.
The server will need to be restarted manually to reflect new changes.
The webpage in the browser is automatically reloaded to reflect the new changes.
Where is the
manage.py
file located?Inside the project's outer container folder
Inside the scripts folder of the current Python environment.
Inside the app package folder
Inside the project package folder
By default, Django's built-in development server runs on the local machine with IP address 127.0.0.1 and port 8000.
True
False
Does the View layer in Django correspond to the View layer in MVC architecture?
Yes
No
Which of the following statements is true about the view function? Select all that apply.
Receives the request object from the server.
Loads the template
Interacts with the model layer
Returns a response to the client
Which of the following statements are true about a model in Django? Select all that apply.
The Model defines the processing logic of the Django application.
A Django Template fetches the data from a Model and displays it on a web page.
A model is a Python class
Model class attributes are used to create a database table.
Which Python module is used from the command-line to create a virtual environment?
shell
startapp
pip3
venv
Which of these pre-built apps are installed in a Django project by default? Select all that apply.
postgress app
django.contrib.auth
django.contrib.admin
django.contrib.messages
Subscribe to my newsletter
Read articles from David Nguyen directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

David Nguyen
David Nguyen
A passionate full-stack developer from @ePlus.DEV