[go: up one dir, main page]

0% found this document useful (0 votes)
15 views2 pages

CH 9 Creating A Django Based Basic Web Application CPA

The document provides a series of questions and answers related to Django web development, highlighting its advantages, architecture, and various commands. Key points include the use of 'startproject' to create a new project, the role of settings.py for configuration, and the default server port and URL. It also identifies important files like manage.py, views.py, and urls.py within a Django project.

Uploaded by

01kumatyt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

CH 9 Creating A Django Based Basic Web Application CPA

The document provides a series of questions and answers related to Django web development, highlighting its advantages, architecture, and various commands. Key points include the use of 'startproject' to create a new project, the role of settings.py for configuration, and the default server port and URL. It also identifies important files like manage.py, views.py, and urls.py within a Django project.

Uploaded by

01kumatyt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CHECK POINT ANSWERS

CH – 9 CREATING A DJANGO BASED BASIC WEB APPLICATION


1. What are the advantages of using Django for web development?
a. It facilitates you to divide code modules into logical groups to make it flexible to change.
b. It provides auto-generated web-admin to make website administration easy.
c. It provides pre-packaged API for common user tasks.
d. All of the above.
Ans: d. All of the above.
2. The architecture of Django consists of?
a. Models. b. Views. c. Templates. d. All of these.
Ans: d. All of these.
3. Which option do you use with django-admin to create project in Django?
a. Newproject. b. myproject. c. createproject. d. startproject.
Ans: d. startproject.
4. Write Django command to create a Django project namely easysell.
django-admin startproject easysell
5. What is the Django command used with Python command to start a new app named ‘list’ in an
existing project?
python manage.py startapp <app name>
6. What is the purpose of settings.py?
a. To configure settings for the Django project. b. To configure settings for an app.
c. To set the date and time on the server. d. To sync the database schema.
Ans: a. To configure settings for the Django project.
7. What is the Django shortcut method to more easily render an html response?
a. render_to_html b. render_to_response c. response_render d. render
Ans: d. render_to_response
8. What is the default port used by built in webserver of Django?
a. 800 b. 8000 c. 8800 d. 127.0.0.1:8000
Ans: b. 8000
9. What is the default URL of you Django project when you run it on built-in server?
a. localhost:8000 b. localhost c. 127.0.0.1 d. 127.0.0.1:8000
Ans: a. localhost:8000
10. What is the name of the administrative task management file in Django project?
a. manage.py b. urls.py c. views.py d. models.py
Ans: a. manage.py
11. What is the name of the app module in Django projects that stores the view functions?
a. manage.py b. urls.py c. views.py d. models.py
Ans: c. views.py
12. What is the name of the module in Django projects that stores URL Confs?
a. manage.py b. urls.py c. views.py d. models.py
Ans: b. urls.py

You might also like