Django 面接の質問と回答
質問 26. What is Jinja templating?
Django comes with the support for many popular templating engines, and by default, it comes with one very powerful templating engine, called Jinja Templating. The latest version is Jinja 2.
Below are some features of the Jinja templating, making it a better option than another templating engine available.
- Sandbox Execution: It is a protected framework useful for automating the testing process
- HTML Escaping: Jinja 2 comes with an automatic HTML Escaping, as <, >, & characters that have special values in templates. If you use it as regular text, these symbols can lead to XSS Attacks, handled by Jinja automatically.
- It shows template inheritance and generates HTML templates much faster than the default engine
- It is easier to debug with Jina compared to the default engine
質問 27. What is user authentication in Django?
Django has a built-in user authentication system capable of handling different objects, such as users, groups, user-permissions, and some cookie-based user sessions.
Django’s User authentication not only helps in authenticating, but also in authorizing a user and checking what permissions that user has.
The system operates on the following objects:
- Users
- Permissions
- Groups
- Password Hashing System
- Forms Validation
- A pluggable backend system
Third-party web applications can be used instead of the default system as you have much more control over user authentication and many other features.
質問 28. What is the purpose of middleware in Django?
In Django, middleware is the component that works on request and transfers it to the view, and before it passes it to the template engine, it starts operating on a response.
- SecurityMiddleware
- SessionMiddleware
- CommonMiddleware
- CsrfViewMiddleware
- AuthenticationMiddleware
- MessageMiddleware
- XFrameOptionsMiddleware
質問 29. What is the use of the djangopackages.org website?
In Django, the packages website is the place where all the third-party applications are uploaded. You can install them in your system.
質問 30. What popular websites use Django?
Django is a compelling framework and is used by various renowned organizations. Some of the highly trafficked websites using Django are:
- Disqus
- Mozilla
- Bitbucket
- YouTube
- Spotify
- NASA
- Eventbrite
ユーザー評価で最も役立つ内容:
- What are the different applications of Django?
- What are view functions? Can you directly import a function within the URL?
- What is a model in Django?