Django Rest and Angular
Django Rest and Angular
What is Django?
for managing the application's data models. It allows administrators to perform CRUD
Web APIs. It's an extension of Django that simplifies the creation of APIs.
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.
URL routing
Template engine
Middleware support
Form handling
Authentication system
What are the various files that are created when you create a Django Project? Explain briefly.
permissions?
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
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.
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
What is CORS?
IsAuthenticatedOrReadOnly - unauthorized users can view any page, but only authenticated
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.
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 (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
What is TypeScript?
What is data binding? Which type of data binding does Angular deploy?
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
A component is responsible for rendering a view and handling user interactions with
the view
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold,