django interview questions and answers

12
Django Interview Questions and Answers Author : Renjith S Raj Desg : Senior Python/Django developer

Upload: renjith-s-raj

Post on 13-Jan-2017

313 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Django Interview Questions and Answers

Django Interview Questions and AnswersAuthor : Renjith S RajDesg : Senior Python/Django developer

Page 2: Django Interview Questions and Answers

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.

Page 3: Django Interview Questions and Answers

Are you ready .....?

Page 4: Django Interview Questions and Answers

1.What is Django ?

Ans . What a funny questions , but take it as serious ...heeDjango 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/

Page 5: Django Interview Questions and Answers

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 ?

Page 6: Django Interview Questions and Answers

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

Page 7: Django Interview Questions and Answers

4.Architecture of django project ?

Ans: Please explain with sample project. The following diagram will you the exact idea about the Architecture

Page 8: Django Interview Questions and Answers

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

Page 9: Django Interview Questions and Answers

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

Page 10: Django Interview Questions and Answers

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”,]

Page 11: Django Interview Questions and Answers

8.What is CSRF ? Whats d the impo?

Ans:CROSS SITE REQUEST FORGERYCSRF 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

Page 12: Django Interview Questions and Answers

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