Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Django is a web framework written in Python for building web applications.
Question 2 of 60 · Introduction to Django · Easy
Which programming language is primarily used with Django?
Not quite. Try another option.
Answer: Python
Django is built with Python, and Django applications are primarily developed using Python.
Question 3 of 60 · Introduction to Django · Easy
Which architectural pattern does Django commonly follow?
Not quite. Try another option.
Answer: Model-View-Template
Django follows the Model-View-Template pattern, commonly abbreviated as MVT.
Question 4 of 60 · Installing Python and Django · Easy
Which command is commonly used to install Django with pip?
Not quite. Try another option.
Answer: pip install django
The pip install django command downloads and installs the Django package.
Question 5 of 60 · Installing Python and Django · Easy
Which command can display the installed Python version?
Not quite. Try another option.
Answer: python --version
The python --version command prints the Python version available in the terminal.
Question 6 of 60 · Setting up project in editor · Easy
Which editor feature helps developers run Django commands without leaving the editor?
Not quite. Try another option.
Answer: Integrated terminal
An integrated terminal lets developers run commands such as python manage.py runserver within the editor.
Question 7 of 60 · Setting up project in editor · Easy
What should normally be opened as the workspace folder in a code editor?
Not quite. Try another option.
Answer: The Django project folder
Opening the project folder gives the editor access to the Django source files and configuration.
Question 8 of 60 · Projects and Apps overview · Easy
What does a Django project usually represent?
Not quite. Try another option.
Answer: The complete web application configuration
A Django project contains the overall configuration and can include multiple apps.
Question 9 of 60 · Projects and Apps overview · Easy
What is a Django app designed to provide?
Not quite. Try another option.
Answer: A specific reusable feature
A Django app usually handles a focused feature, such as accounts, products, or a blog.
Question 10 of 60 · Projects and Apps overview · Easy
Can one Django project contain multiple apps?
Not quite. Try another option.
Answer: Yes, it can contain multiple apps
A Django project can combine multiple apps, each responsible for a particular feature.
Question 11 of 60 · Project structure · Easy
Which Django project file contains settings such as installed apps and database configuration?
Not quite. Try another option.
Answer: settings.py
The settings.py file stores the main configuration values for a Django project.
Question 12 of 60 · Project structure · Easy
Which project file usually defines the main URL routes?
Not quite. Try another option.
Answer: urls.py
The project's urls.py file maps URL patterns to views or includes app URL configurations.
Question 13 of 60 · Project structure · Easy
What is the purpose of the wsgi.py file in a Django project?
Not quite. Try another option.
Answer: It provides a WSGI deployment entry point
The wsgi.py file exposes the Django application to WSGI-compatible web servers.
Question 14 of 60 · Creating your first project · Easy
Which command creates a Django project named mysite?
Not quite. Try another option.
Answer: django-admin startproject mysite
The startproject command creates the initial files and folders for a new Django project.
Question 15 of 60 · Django-admin and manage.py commands · Easy
Which command starts Django's development server?
Not quite. Try another option.
Answer: python manage.py runserver
The runserver command launches Django's local development server.
Question 16 of 60 · Django-admin and manage.py commands · Easy
What is manage.py mainly used for?
Not quite. Try another option.
Answer: Running project-specific Django commands
The manage.py script runs administrative commands using the current project's settings.
Question 17 of 60 · Django-admin and manage.py commands · Easy
Which command applies pending database migrations?
Not quite. Try another option.
Answer: python manage.py migrate
The migrate command applies migration files to create or update database structures.
Question 18 of 60 · App structures · Easy
Which file in a Django app is commonly used to define database models?
Not quite. Try another option.
Answer: models.py
Database models are normally defined as Python classes in the app's models.py file.
Question 19 of 60 · App structures · Easy
Which file in a Django app commonly contains request-handling functions or classes?
Not quite. Try another option.
Answer: views.py
The views.py file commonly contains views that receive requests and return responses.
Question 20 of 60 · Creating an App · Easy
Which command creates a Django app named blog?
Not quite. Try another option.
Answer: python manage.py startapp blog
The startapp command creates the standard folder and files for a new Django app.
Question 21 of 60 · Introduction to Django · Medium
A team must quickly build a database-backed employee portal with authentication and an administrative interface. Why is Django a suitable choice?
Not quite. Try another option.
Answer: It provides an ORM, authentication, and an admin interface
Django includes common web-development features such as an ORM, authentication, URL routing, and an automatically generated administration interface.
Question 22 of 60 · Installing Python and Django · Medium
Which sequence correctly installs Django in an isolated environment for a new project?
Not quite. Try another option.
Answer: Create a virtual environment, activate it, and run pip install django
A virtual environment isolates project dependencies. After activating it, pip install django installs Django only for that environment.
Question 23 of 60 · Installing Python and Django · Medium
A computer has several Python installations. Which command most reliably checks the Django version available to the Python interpreter currently being used?
Not quite. Try another option.
Answer: python -m django --version
python -m django --version invokes Django through the selected Python interpreter, reducing ambiguity when multiple Python installations exist.
Question 24 of 60 · Setting up project in editor · Medium
Django runs correctly from an activated virtual environment, but the editor reports that django imports cannot be resolved. What should be checked first?
Not quite. Try another option.
Answer: The editor is using the virtual environment's Python interpreter
The editor must use the same virtual-environment interpreter in which Django was installed. Otherwise, code analysis may not find the package.
Question 25 of 60 · Projects and Apps overview · Medium
An online store needs separate functionality for products, customer accounts, and payments. Which Django organization is most appropriate?
Not quite. Try another option.
Answer: One project containing separate products, accounts, and payments apps
A Django project represents the overall website, while apps divide the project into focused functional components.
Question 26 of 60 · Projects and Apps overview · Medium
A reviews component may be reused in a bookstore site and a movie site. Which design best supports this goal?
Not quite. Try another option.
Answer: Keep reviews in a focused app with limited project-specific dependencies
A focused, loosely coupled app is easier to install and reuse across multiple Django projects.
Question 27 of 60 · Project structure · Medium
After running django-admin startproject portal, which file should be edited to add an installed app and configure a database?
Not quite. Try another option.
Answer: portal/portal/settings.py
settings.py contains project-wide configuration, including INSTALLED_APPS, database settings, middleware, and templates.
Question 28 of 60 · Project structure · Medium
A developer wants requests beginning with /blog/ to be handled by the blog app. Which project file normally contains the top-level URL mapping?
Not quite. Try another option.
Answer: project_package/urls.py
The project's urls.py is the root URL configuration and can delegate /blog/ requests to the app's URL configuration.
Question 29 of 60 · Project structure · Medium
A deployment platform requires an ASGI callable for an asynchronous-compatible deployment. Which generated file exposes the appropriate application object?
Not quite. Try another option.
Answer: asgi.py
asgi.py exposes the ASGI application callable used by ASGI-compatible deployment servers.
Question 30 of 60 · Creating your first project · Medium
A developer is already inside an empty directory named schoolsite and wants manage.py created directly in that directory without another nested outer folder. Which command should be used?
Not quite. Try another option.
Answer: django-admin startproject config .
The final dot tells Django to create the project in the current directory, placing manage.py there and creating the config package.
Question 31 of 60 · Django-admin and manage.py commands · Medium
Which command starts Django's development server on local port 8080?
Not quite. Try another option.
Answer: python manage.py runserver 8080
runserver 8080 starts the development server using port 8080 instead of the default port 8000.
Question 32 of 60 · Django-admin and manage.py commands · Medium
The initial Django project contains migration files for built-in apps, but their database tables do not yet exist. Which command applies them?
Not quite. Try another option.
Answer: python manage.py migrate
migrate applies existing migrations and creates or updates the corresponding database tables.
Question 33 of 60 · Django-admin and manage.py commands · Medium
Why is python manage.py <command> commonly used after a Django project has been created instead of django-admin <command>?
Not quite. Try another option.
Answer: manage.py automatically points commands to the project's settings
manage.py sets the project's settings module, so management commands run in the correct project context.
Question 34 of 60 · Django-admin and manage.py commands · Medium
A developer wants Django to detect common configuration problems without starting the server or modifying the database. Which command is most appropriate?
Not quite. Try another option.
Answer: python manage.py check
The check command runs Django's system checks and reports many configuration and model-related problems without changing the database.
Question 35 of 60 · App structures · Medium
A developer is adding a database-backed Article entity to a newly created app. In which file should the model class normally be defined?
Not quite. Try another option.
Answer: models.py
Django model classes are normally defined in models.py, where they describe application data and database relationships.
Question 36 of 60 · App structures · Medium
A Product model already exists, and the developer wants it to appear in Django's administration interface. Which app file is normally updated to register it?
Not quite. Try another option.
Answer: admin.py
Models are normally registered with the Django admin site in the app's admin.py file.
Question 37 of 60 · App structures · Medium
What is the primary purpose of the migrations directory inside a Django app?
Not quite. Try another option.
Answer: It stores versioned descriptions of database schema changes
Migration files record changes to an app's models so Django can apply corresponding schema changes in a controlled order.
Question 38 of 60 · Creating an App · Medium
From the directory containing manage.py, which command correctly creates an app named inventory?
Not quite. Try another option.
Answer: python manage.py startapp inventory
The startapp management command creates the standard app structure for inventory within the current project workspace.
Question 39 of 60 · Creating an App · Medium
An app named inventory has been created, but Django does not detect its models when makemigrations is run. What is the most likely missing step?
Not quite. Try another option.
Answer: Add inventory or its app configuration to INSTALLED_APPS
Django loads models and other app features only after the app is registered in the project's INSTALLED_APPS setting.
Question 40 of 60 · Creating an App · Medium
A developer creates a blog app and defines views in it, but visiting /blog/ still produces a 404 response. Which integration step is required?
Not quite. Try another option.
Answer: Connect a URL pattern to the app's views through the URL configuration
Creating an app does not automatically expose its views. A URL pattern must route incoming requests to the appropriate view.
Question 41 of 60 · Introduction to Django · Hard
A Django view retrieves records through the ORM, renders them with a template, and returns an HTTP response. Which mapping most accurately describes Django's MTV architecture in this request?
Not quite. Try another option.
Answer: Model manages data, Template handles presentation, and View coordinates request processing
In Django's MTV pattern, models represent data, templates define presentation, and views process requests and produce responses.
Question 42 of 60 · Installing Python and Django · Hard
Django was installed successfully with pip install django, but python -m django --version reports No module named django. Which diagnosis is most likely?
Not quite. Try another option.
Answer: pip installed Django for a different Python interpreter than the one invoked by python
The pip and python commands may resolve to different installations. Using python -m pip install django targets the interpreter invoked by python.
Question 43 of 60 · Installing Python and Django · Hard
A developer wants to guarantee that Django is installed into the currently activated virtual environment, even when multiple pip executables exist on PATH. Which command is the most reliable?
Not quite. Try another option.
Answer: python -m pip install Django
Running pip as python -m pip ties package installation to the exact Python interpreter selected by the active environment.
Question 44 of 60 · Setting up project in editor · Hard
A Django project runs correctly from a terminal with its virtual environment activated, but the editor marks every django import as unresolved. What is the most appropriate correction?
Not quite. Try another option.
Answer: Configure the editor to use the virtual environment's Python interpreter
The editor's language tools must use the same interpreter in which Django is installed; terminal activation alone may not configure the editor.
Question 45 of 60 · Projects and Apps overview · Hard
A team is building an e-commerce site with independently reusable inventory, payment, and review functionality. Which design best follows Django's project-and-app model?
Not quite. Try another option.
Answer: Use one project containing separate inventory, payment, and review apps
A project provides site-wide configuration, while apps encapsulate cohesive features that can be developed and potentially reused independently.
Question 46 of 60 · Projects and Apps overview · Hard
An app package exists inside a Django project and can be imported successfully, but Django does not discover its models during normal application loading. Which omission most directly explains this?
Not quite. Try another option.
Answer: The app or its AppConfig is absent from INSTALLED_APPS
INSTALLED_APPS controls Django's application registry. Importability alone does not cause Django to register an app or discover its models.
Question 47 of 60 · Project structure · Hard
After running django-admin startproject config, which file is intended primarily as the command-line entry point and normally sets DJANGO_SETTINGS_MODULE before delegating to Django?
Not quite. Try another option.
Answer: manage.py
manage.py initializes the project's settings context and passes command-line arguments to Django's management-command system.
Question 48 of 60 · Project structure · Hard
A generated project's inner package is renamed from config to core, but no file contents are updated. Running python manage.py check now fails to import the settings module. Which reference must be updated to address this immediate failure?
Not quite. Try another option.
Answer: DJANGO_SETTINGS_MODULE in manage.py from config.settings to core.settings
manage.py initially points to config.settings. After renaming the package, that module path must become core.settings for management commands to load settings.
Question 49 of 60 · Creating your first project · Hard
A developer is already inside an existing repository root and wants manage.py placed there while creating the project package as config/. Which command is appropriate?
Not quite. Try another option.
Answer: django-admin startproject config .
The dot supplies the current directory as the destination, so Django creates manage.py there and creates the config project package beneath it.
Question 50 of 60 · Creating your first project · Hard
A directory already contains a file named manage.py. What should a developer expect when running django-admin startproject config . in that directory?
Not quite. Try another option.
Answer: Django refuses to overwrite the conflicting file and reports an error
startproject protects existing files from template-name collisions rather than silently overwriting or renaming them.
Question 51 of 60 · Django-admin and manage.py commands · Hard
Why does python manage.py check usually work without a --settings argument, while a directly invoked django-admin check may require settings configuration?
Not quite. Try another option.
Answer: manage.py sets the project's default DJANGO_SETTINGS_MODULE before executing commands
manage.py is project-aware because it defines a default settings-module path. django-admin needs equivalent context from the environment or --settings.
Question 52 of 60 · Django-admin and manage.py commands · Hard
A project has config/settings/dev.py and config/settings/prod.py, and no usable default settings module. Which command explicitly runs system checks with the development settings?
The --settings option expects a dotted Python module path, not a filesystem path. Here the correct module is config.settings.dev.
Question 53 of 60 · Django-admin and manage.py commands · Hard
A developer changes a model class and immediately runs python manage.py migrate, but no database alteration occurs. Assuming the app is installed correctly, which missing action best explains the result?
Not quite. Try another option.
Answer: Run python manage.py makemigrations to generate a migration first
makemigrations converts detected model changes into migration files; migrate applies migration files that already exist.
Question 54 of 60 · Django-admin and manage.py commands · Hard
A development server must accept connections from other machines on the local network using port 9000. Which command requests the required binding?
Not quite. Try another option.
Answer: python manage.py runserver 0.0.0.0:9000
Binding to 0.0.0.0 listens on all available IPv4 interfaces. localhost and 127.0.0.1 accept only local connections.
Question 55 of 60 · App structures · Hard
In a newly generated Django app, which file is specifically intended to define application metadata and startup configuration through a subclass of AppConfig?
Not quite. Try another option.
Answer: apps.py
apps.py normally contains the app's AppConfig, including its import path, display label, default primary-key configuration, and optional startup hooks.
Question 56 of 60 · App structures · Hard
A migration file imports migrations and defines dependencies and operations but is never detected by Django. The filename is valid and the app is installed. Which structural problem is most likely?
Not quite. Try another option.
Answer: The file is outside the app's migrations Python package
Django discovers migration modules inside the app's migrations package. Models, URL patterns, and admin registration do not manually import migration files.
Question 57 of 60 · Creating an App · Hard
A developer runs python manage.py startapp reports, sees the new package, and then runs makemigrations reports. Django responds that no installed app has the label reports. What is the most likely cause?
Not quite. Try another option.
Answer: The generated app was not added to INSTALLED_APPS
startapp creates files but does not automatically register the app. Django must load it through INSTALLED_APPS before recognizing its app label.
Question 58 of 60 · Creating an App · Hard
An app is stored at company/modules/billing, and its AppConfig.name is company.modules.billing. Which INSTALLED_APPS entry most explicitly selects that configuration class?
startapp accepts the app name followed by an optional destination directory. When an explicit destination is supplied, that directory must already exist.
Question 60 of 60 · Project structure · Hard
A deployment server needs a synchronous WSGI callable, while another server needs an asynchronous ASGI callable. Which generated modules expose these interfaces by default?
Not quite. Try another option.
Answer: wsgi.py exposes application for WSGI, and asgi.py exposes application for ASGI
A generated project provides separate deployment entry points: wsgi.py for WSGI servers and asgi.py for ASGI servers.
That's unit 1
Answer a few questions and your score shows up here.
Nearly through. Did unit 1 of INT253 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 1 of INT253 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.