Bytes

Django Quiz - 7

Module - 7 Deploying a Django Site
Django Quiz - 7

1. Which web server is commonly used to deploy Django applications?
a) Apache
b) Nginx
c) IIS
d) Tomcat
Answer: b) Nginx

2. Which protocol is commonly used to serve Django applications over the internet?
a) HTTP
b) FTP
c) SMTP
d) SSH
Answer: a) HTTP

3. Which database management system is commonly used with Django?
a) MySQL
b) PostgreSQL
c) SQLite
d) All of the above
Answer: d) All of the above

4. Which command is used to collect static files in Django?
a) python manage.py collectstatic
b) python manage.py staticfiles
c) python manage.py compilestatic
d) python manage.py staticcollect
Answer: a) python manage.py collectstatic

5. Which file is used to configure the deployment settings in Django?
a) settings.py
b) urls.py
c) wsgi.py
d) deploy.py
Answer: c) wsgi.py

6. Which cloud platform can be used to deploy Django applications?
a) Amazon Web Services (AWS)
b) Google Cloud Platform (GCP)
c) Microsoft Azure
d) All of the above
Answer: d) All of the above

7. What is the purpose of a virtual environment in Django deployment?
a) To isolate project dependencies
b) To improve performance
c) To ensure compatibility with different operating systems
d) To enable automatic scaling
Answer: a) To isolate project dependencies

8. Which command is used to install project dependencies from a requirements.txt file?
a) pip install -r requirements.txt
b) pip install requirements.txt
c) pip install requirements
d) pip install -requirements.txt
Answer: a) pip install -r requirements.txt

9. Which file is used to specify the URL mappings in Django?
a) settings.py
b) urls.py
c) views.py
d) routes.py
Answer: b) urls.py

10. Which command is used to run database migrations in Django?
a) python manage.py migrate
b) python manage.py runmigrations
c) python manage.py dbmigrate
d) python manage.py syncdb
Answer: a) python manage.py migrate

11. Which configuration file is used to specify environment variables in Django deployment?
a) .env
b) config.ini
c) settings.py
d) env.txt
Answer: a) .env

12. Which command is used to start a Django application in production mode?
a) python manage.py runserver
b) python manage.py startapp
c) python manage.py runprod
d) python manage.py startprod
Answer: c) python manage.py runprod

Recommended Courses
Certification in Full Stack Web Development
Course
20,000 people are doing this course
Become a job-ready Full Stack Web Developer in 30 weeks. Join the largest tech community in India. Pay only after you get a job above 5 LPA.
Masters in Computer Science: Software Engineering
Course
20,000 people are doing this course
Join India's only Pay after placement Master's degree in Computer Science. Get an assured job of 5 LPA and above. Accredited by ECTS and globally recognised in EU, US, Canada and 60+ countries.

AlmaBetter’s curriculum is the best curriculum available online. AlmaBetter’s program is engaging, comprehensive, and student-centered. If you are honestly interested in Data Science, you cannot ask for a better platform than AlmaBetter.

avatar
Kamya Malhotra
Statistical Analyst
Fast forward your career in tech with AlmaBetter

Vikash SrivastavaCo-founder & CPTO AlmaBetter

Vikas CTO

Related Tutorials to watch

Top Articles toRead

AlmaBetter
Made with heartin Bengaluru, India
  • Official Address
  • 4th floor, 133/2, Janardhan Towers, Residency Road, Bengaluru, Karnataka, 560025
  • Communication Address
  • 4th floor, 315 Work Avenue, Siddhivinayak Tower, 152, 1st Cross Rd., 1st Block, Koramangala, Bengaluru, Karnataka, 560034
  • Follow Us
  • facebookinstagramlinkedintwitteryoutubetelegram

© 2023 AlmaBetter