Django Flashcards

(10 cards)

1
Q

What is Django?

A

Django is a high-level Python web framework that helps you build secure, scalable web applications quickly by providing built-in tools for URL routing, views, templates, database access (ORM), authentication, and more — so you don’t have to build those components from scratch.

  • Django follows the MVT (Model–View–Template) architectural pattern.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the Django Project?

A

The top-level configuration container that allows you to define settings, middleware, environment variables, and global URLs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Django App?

A

A modular component within a project responsible for a specific feature (e.g., products, users).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the Django ORM?

A

The Django ORM (Object-Relational Mapper) is a high-level abstraction layer that lets you interact with your database using Python classes and methods instead of writing raw SQL.

It automatically translates Python operations into SQL queries behind the scenes, allowing you to:

  • Define database tables using Python classes (Models)
  • Create, read, update, and delete records using Python methods
  • Avoid manually writing SQL queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does a Django Model represent?

A

A Python class that maps to a SQL database table using Django’s ORM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a View in Django?

A

A Django View is the component responsible for handling incoming HTTP requests, executing the necessary business logic, interacting with the database when needed, and returning an appropriate HTTP response (HTML, JSON, redirect, file, etc.).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Django URL config file?

A

A mapping of URL paths to views that Django uses to route requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Templates in Django?

A

Templates in Django are HTML files that contain dynamic placeholders (using the Django Template Language) that the backend fills with data before sending the final HTML to the browser.

  • Templates define how the data should be presented — they focus purely on layout and display.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are Django middlewares?

A

Request/response processing hooks that run globally, used for auth, security, sessions, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Request-Response Cycle in Django?

A

Browser → Middlware → URL Resolver → View → Model/DB → Response back to browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly