0% found this document useful (0 votes)
15 views

Django Rest and Angular

Uploaded by

ajuajveed
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Django Rest and Angular

Uploaded by

ajuajveed
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

DJANGO REST AND ANGULAR

What is Django?

Explain the MVC architecture in Django.

What is the Django ORM?

What is the purpose of Django migrations?

Explain the role of Django models.

How does Django handle URL routing?

What is the purpose of Django templates?

Explain the purpose of Django views.

What is Django middleware?

How does Django handle user authentication?

What is the purpose of Django forms?

Explain the role of Django admin.

 Django admin is a built-in feature that provides a web-based interface

for managing the application's data models. It allows administrators to perform CRUD

operations on the database without writing custom views.

What is Django REST framework?

 Django REST framework is a powerful and flexible toolkit for building

Web APIs. It's an extension of Django that simplifies the creation of APIs.

Explain the Django URL patterns and how they work.

 URL patterns in Django are defined in the urls.py file. They map URL

patterns to views, allowing the framework to route incoming requests to the appropriate view.

Explain the Model-View-Controller (MVC) architecture and how it applies to Django.

What is Django's template engine?


What are the main features of Django?

 Object-Relational Mapping (ORM)

 Built-in admin panel

 URL routing

 Template engine

 Middleware support

 Form handling

 Authentication system

How do you connect your Django Project to the database?

How to configure static files?

What databases are supported by Django?

What is django.shortcuts.render function?

What are the various files that are created when you create a Django Project? Explain briefly.

What are ‘views’?Types of views

What are ‘sessions’?

What is the difference between a Project and an App?

What do you mean by context?

Explain the use of ‘migrate’ command in Django?

How to view and filter items from the database?

Explain Q objects in Django ORM?

what do you mean by the csrf_token?

The csrf_token is used for protection against Cross-Site Request Forgeries.

How to make a variable available to all the templates?

What is serialization in Django?

Which companies use Django?

Instagram, Disqus, Mozilla, Bitbucket, Spotify, NASA, Eventbrite, etc.

What is the latest version of Django?

How do you handle authentication using Django Rest Framework?

Can you explain what token-based authentication is?


What’s the best way to limit access to an API or endpoints based on user roles and

permissions?

What are viewsets in Django Rest Framework?

Viewsets are a way of grouping together related view functionality in Django Rest

Framework. They provide a more concise and convenient way to write your views, and can

help to keep your code more organized.

What’s the difference between a viewset and a view?

A viewset is a class that provides a set of actions that can be performed on a model.

A view, on the other hand, is a single function that performs a specific action on a model.

What are routers in Django Rest Framework?

Routers are used in Django Rest Framework to automatically generate URLs for a

given resource. This can be helpful if you have a large number of resources and don’t want to

have to manually create URLs for each one.

What is CORS?

what are Project-Level Permissions?

Django REST Framework ships with a number of built-in project-level permissions

settings we can use, including:

AllowAny - any user, authenticated or not, has full access

IsAuthenticated - only authenticated, registered users have access

IsAdminUser - only admins/superusers have access

IsAuthenticatedOrReadOnly - unauthorized users can view any page, but only authenticated

users have write, edit, or delete privileges

What is the difference between APIViews and Viewsets in DRF?

DRF has two main systems for handling views:


APIView: This provides methods handler for http verbs: get, post, put, patch, and delete.

ViewSet: This is an abstraction over APIView, which provides actions as methods:

list: read only, returns multiple resources (http verb: get). Returns a list of dicts.

retrieve: read only, single resource (http verb: get, but will expect an id in the url). Returns a

single dict.

create: creates a new resource (http verb: post)

update/partial_update: edits a resource (http verbs: put/patch)

destroy: removes a resource (http verb: delete)

What is an API?

API stands for Application Programming Interface. It is a set of rules and protocols

that allows different software applications to communicate with each other. APIs define the

methods and data formats used for interaction between applications.

What is REST and REST API?

REST (Representational State Transfer) is an architectural style for designing

networked applications. It is based on a set of principles, such as using standard HTTP

methods (GET, POST, PUT, DELETE) to perform operations on resources. A REST API is an

API that follows the principles of REST, allowing clients to interact with server resources using

HTTP.

Describe the difference between authentication and authorization in the context of DRF.

Authentication verifies the identity of users, ensuring they are who they claim to be.

Authorization, on the other hand, determines whether authenticated users have permission to

perform certain actions on resources.

What is Angular? Why was it introduced?

What is TypeScript?
What is data binding? Which type of data binding does Angular deploy?

Differentiate between Angular and AngularJS

Explain Components, Modules and Services in Angular

services in Angular let you define code or functionalities that are then accessible and

reusable in many other components in your Angular project. Services help you with the

abstraction of logic and data that is hosted independently but can be shared across other

components.

Angular applications are modular and Angular has its own modularity system called

NgModules.NgModules are containers for a cohesive block of code dedicated to an

application domain, a workflow, or a closely related set of capabilities.

A component is responsible for rendering a view and handling user interactions with

the view

What is the ngModel directive used for?

The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold,

and maintain Angular applications directly from a command shell.

You might also like