What is the role of the settings.py file in a Django project?

What is the role of the settings.py file in a Django project?

a) To store all the URLs for the project
b) To configure the project’s settings, including database, middleware, and apps
c) To define views and templates
d) To handle user authentication

Answer:

b) To configure the project’s settings, including database, middleware, and apps

Explanation:

The settings.py file in a Django project is where you configure important project settings, such as the database, installed apps, static files, and middleware.

Reference:

Django Quiz – MCQ Questions and Answers

Scroll to Top