Skip to content
Snippets Groups Projects
Commit 39311547 authored by Jaemin Shin's avatar Jaemin Shin
Browse files

Update file api.rst

parent 10226c44
No related branches found
No related tags found
No related merge requests found
...@@ -6,27 +6,20 @@ API ...@@ -6,27 +6,20 @@ API
:synopsis: public Jinja API :synopsis: public Jinja API
이 문서는 템플릿 언어가 아닌 Jinja의 API를 설명합니다.(탬플릿 언어는 다음을 참조 : :doc:`/templates`) 이 문서는 템플릿 언어가 아닌 Jinja의 API를 설명합니다.(탬플릿 언어는 다음을 참조 : :doc:`/templates`)
. It will be most useful as reference Jinja 탬플릿을 만드는 사람들 보다는 어플리케이션의 인터페이스를 구성하는 분들이 유용하게 참조할 수 있습니다.
to those implementing the template interface to the application and not
those who are creating Jinja templates.
Basics Basics
------ ------
Jinja uses a central object called the template :class:`Environment`. Jinja는 핵심 개체로 탬플릿 :class:`Environment`를 사용합니다.
Instances of this class are used to store the configuration and global objects, 이 개체의 instance는 구성과 전역변수를 저장하고 파일 시스템 또는 다른 위치로부터 탬플릿을 로드합니다.
and are used to load templates from the file system or other locations. 당신이 :class:`Template`의 생성자를 사용하여 탬플릿을 만들더라도, 공유되는 :class:`Environment`를 자동적으로 생성합니다.
Even if you are creating templates from strings by using the constructor of
:class:`Template` class, an environment is created automatically for you,
albeit a shared one.
Most applications will create one :class:`Environment` object on application 대부분의 어플리케이션은 초기 실행될때 하나의 :class:`Environment` 객체를 생성하고 탬플릿들을 호출합니다.
initialization and use that to load templates. In some cases however, it's 다만 다른 구성들이 사용되는 경우에는 경우에 따라 복수의 환경을 사용하는 것이 유리합니다.
useful to have multiple environments side by side, if different configurations
are in use. 어플리케이션의 탬플릿을 불러오기 위해 Jinja를 구성하는 가장 간단한 방법은 :class:`~loaders.PackageLoader`을 사용하는 것 입니다.
The simplest way to configure Jinja to load templates for your
application is to use :class:`~loaders.PackageLoader`.
.. code-block:: python .. code-block:: python
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment