Django
Django
DRF is help to write less code and more reusebility of class when
compared to Django
Authentication Authorization
What does it do? Verifies credentials Grants or denies
permissions
How does it Through passwords, Through settings
work? biometrics, one-time pins, or maintained by security
apps teams
Is it visible to the Yes No
user?
It is changeable Partially No
by the user?
How does data Through ID tokens Through access tokens
move?
4)What is the difference between Cookie and Session?Where do you
use these in your project?
5) We have two tables with foreign key relation.How do you get related
data from child table based on parent table Value(id)
Employee.objects.get(created_by=created_by)
A. cross site request forgery is used to secure form which was filled by
user that is send to server side
B. To keep views secure we use csrf_exempt
C. If someone access to the csrftoken cookie in the middle then it will
cause hacked to avoid this we use HTTP or HTTPS protocols
To set up HTTP these point add to settings.py
Csrf_cookie_secure=True
Session_cookie_secure=True
D. Django itself has Django administration secure,before you deploy
your application, you want to change admin path url .
We will use django-admin-honeypot and this will notify you if someone
try to access
E. content security plolity your application is too large , contains a lot of
third party code
11) What are the types of serializes? Which one is best and why?
If URL maps, a view is called that interact with model and template, it
renders a template.
14) What are middle wares ?Why middle wares are used?Have you
created any custom middle wares?
No
These steps to follow to create jenkins job
1. login to jenkins
2. Create new item
3. Enter item details
4. Enter project details
5. Enter repository url
6. Tweak the settings
7. Save the project
8. Build the source code
9. Check the status
10. see the console output
Django apps are reusable i.e. a Django app can be used with
multiple projects.
We have loosely coupled i.e. almost independent components
Multiple developers can work on different components
Debugging and code organization is easy. Django has an excellent
debugger tool.
It also provide pre-installed apps
1. install the database which we want to use using pip install database
name
2. Edit the settings.py in root directory
Database ={
Engine :
Name :
Host :
Username :
Password :
}
It contains dictionary(key-value) format.