SlideShare una empresa de Scribd logo
1 de 12
Django Interview
Questions and Answers
Author : Renjith S Raj
Desg : Senior Python/Django developer
Introduction
Hi All,
This is the Power point presentation for Django Interview questions and answers
Which i have faced in my django career , i hope it will help your career.
Are you ready .....?
1.What is Django ?
Ans . What a funny questions , but take it as serious ...hee
Django is a free and open source web framework written in PYTHON. A web
framework a set of components thats helps you to develop website faster and
easier.
More Info: https://www.djangoproject.com/
2. What is ORM ?
Ans. ORM is a ….bha bha….
An ORM (Object-Relational Mapping) is a tool that lets you query and manipulate
data from a database using an object paradigm.It's a completely ordinary library
written in your language that encapsulates the code needed to manipulate the
data, so you don't use SQL anymore, but directly an object of your language.
More Info : What is ORM ?
3. Django Framework is MVT architecture ?
Ans. MVT …. I know only MVC ….oho..
The Model-View-Template (MVT) is slightly different from MVC. In fact the main
difference between the two patterns is that Django itself takes care of the
Controller part (Software Code that controls the interactions between the Model
and View), leaving us with the template. The template is a HTML file mixed with
Django Template Language (DTL).
More info : Django MVT
4.Architecture of django project ?
Ans: Please explain with sample project. The following diagram will you the exact
idea about the Architecture
5 . How Django Is Scalable ?
Ans:
Some of the busiest sites on the Web leverage Django’s ability to quickly and
flexibly scale.
Go through with the Url you will get the Idea.
http://www.javaworld.com/article/2362947/architecture-scalability/expert-interview-
how-to-scale-django.html
6. Middleware ? How to Custom ? why it
need ?
Ans:
Middlewares are hooks to modify Django request or response object. Putting the
definition of middleware from Django docs. Middleware is a framework of hooks
into Django's request/response processing. It's a light, low-level “plugin” system
for globally altering Django's input or output.
middle ware details
7. What is ALLOWED_HOSTS ?
Ans:
A list of strings representing the host/domain names that this Django site can
serve. This is a security measure to prevent HTTP Host header attacks, which are
possible even under many seemingly-safe web server configurations.
ALLOWED_HOSTS = [‘www.renjith.com’, “renjith.com”,]
8.What is CSRF ? Whats d the impo?
Ans:
CROSS SITE REQUEST FORGERY
CSRF tokens could also be sent to a client by an attacker due to session fixation
or other vulnerabilities, or guessed via a brute-force attack, rendered on a
malicious page that generates thousands of failed requests.
More details
9. What is Decorator in Django?
Ans:
Decorators provide a simple syntax for calling higher-order functions. By definition,
a decorator is a function that takes another function and extends the behavior of
the latter function without explicitly modifying it. Eg : @decotratorname (
@login_required)
more details about decorator

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Introduction to OOP in Python
Introduction to OOP in PythonIntroduction to OOP in Python
Introduction to OOP in Python
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
 
Python OOPs
Python OOPsPython OOPs
Python OOPs
 
Python Programming - Files & Exceptions
Python Programming - Files & ExceptionsPython Programming - Files & Exceptions
Python Programming - Files & Exceptions
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in python
 
Functions in javascript
Functions in javascriptFunctions in javascript
Functions in javascript
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
 
String, string builder, string buffer
String, string builder, string bufferString, string builder, string buffer
String, string builder, string buffer
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
 
Object oriented programming with python
Object oriented programming with pythonObject oriented programming with python
Object oriented programming with python
 
Python programming : Inheritance and polymorphism
Python programming : Inheritance and polymorphismPython programming : Inheritance and polymorphism
Python programming : Inheritance and polymorphism
 
Wrapper classes
Wrapper classesWrapper classes
Wrapper classes
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
 
Java & advanced java
Java & advanced javaJava & advanced java
Java & advanced java
 
Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...
 
Lect 1-java object-classes
Lect 1-java object-classesLect 1-java object-classes
Lect 1-java object-classes
 
Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
 
Python-Polymorphism.pptx
Python-Polymorphism.pptxPython-Polymorphism.pptx
Python-Polymorphism.pptx
 
Object oriented programming With C#
Object oriented programming With C#Object oriented programming With C#
Object oriented programming With C#
 

Similar a Django Interview Questions and Answers

0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
radhianiedjan1
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
Linuxmalaysia Malaysia
 
#nullblr bachav manual source code review
#nullblr bachav manual source code review#nullblr bachav manual source code review
#nullblr bachav manual source code review
Santosh Gulivindala
 

Similar a Django Interview Questions and Answers (20)

Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdfDjango Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
 
Why Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdfWhy Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdf
 
Django Introdcution
Django IntrodcutionDjango Introdcution
Django Introdcution
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
Django vs flask
Django vs flaskDjango vs flask
Django vs flask
 
Django framework
Django frameworkDjango framework
Django framework
 
0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
 
Django part 1
Django part 1Django part 1
Django part 1
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
Django
Django Django
Django
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Django
DjangoDjango
Django
 
Django Vs Ruby on Rails
Django Vs Ruby on Rails Django Vs Ruby on Rails
Django Vs Ruby on Rails
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
Advantages Of Using Django Framework To Build Scalable.pdf
Advantages Of Using Django Framework To Build Scalable.pdfAdvantages Of Using Django Framework To Build Scalable.pdf
Advantages Of Using Django Framework To Build Scalable.pdf
 
Django
DjangoDjango
Django
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
 
#nullblr bachav manual source code review
#nullblr bachav manual source code review#nullblr bachav manual source code review
#nullblr bachav manual source code review
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Django Interview Questions and Answers

  • 1. Django Interview Questions and Answers Author : Renjith S Raj Desg : Senior Python/Django developer
  • 2. Introduction Hi All, This is the Power point presentation for Django Interview questions and answers Which i have faced in my django career , i hope it will help your career.
  • 3. Are you ready .....?
  • 4. 1.What is Django ? Ans . What a funny questions , but take it as serious ...hee Django is a free and open source web framework written in PYTHON. A web framework a set of components thats helps you to develop website faster and easier. More Info: https://www.djangoproject.com/
  • 5. 2. What is ORM ? Ans. ORM is a ….bha bha…. An ORM (Object-Relational Mapping) is a tool that lets you query and manipulate data from a database using an object paradigm.It's a completely ordinary library written in your language that encapsulates the code needed to manipulate the data, so you don't use SQL anymore, but directly an object of your language. More Info : What is ORM ?
  • 6. 3. Django Framework is MVT architecture ? Ans. MVT …. I know only MVC ….oho.. The Model-View-Template (MVT) is slightly different from MVC. In fact the main difference between the two patterns is that Django itself takes care of the Controller part (Software Code that controls the interactions between the Model and View), leaving us with the template. The template is a HTML file mixed with Django Template Language (DTL). More info : Django MVT
  • 7. 4.Architecture of django project ? Ans: Please explain with sample project. The following diagram will you the exact idea about the Architecture
  • 8. 5 . How Django Is Scalable ? Ans: Some of the busiest sites on the Web leverage Django’s ability to quickly and flexibly scale. Go through with the Url you will get the Idea. http://www.javaworld.com/article/2362947/architecture-scalability/expert-interview- how-to-scale-django.html
  • 9. 6. Middleware ? How to Custom ? why it need ? Ans: Middlewares are hooks to modify Django request or response object. Putting the definition of middleware from Django docs. Middleware is a framework of hooks into Django's request/response processing. It's a light, low-level “plugin” system for globally altering Django's input or output. middle ware details
  • 10. 7. What is ALLOWED_HOSTS ? Ans: A list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configurations. ALLOWED_HOSTS = [‘www.renjith.com’, “renjith.com”,]
  • 11. 8.What is CSRF ? Whats d the impo? Ans: CROSS SITE REQUEST FORGERY CSRF tokens could also be sent to a client by an attacker due to session fixation or other vulnerabilities, or guessed via a brute-force attack, rendered on a malicious page that generates thousands of failed requests. More details
  • 12. 9. What is Decorator in Django? Ans: Decorators provide a simple syntax for calling higher-order functions. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it. Eg : @decotratorname ( @login_required) more details about decorator