It’s a good template library even though it’s fairly opinionated and sports aįew idiosyncrasies. Until Django 1.8 it was the only built-in option available. The Django template language is Django’s own Rendering means interpolating the template with context data and returning the Loading consists of finding the template for a given identifierĪnd preprocessing it, usually compiling it to an in-memory representation. You can also write your own custom backend,ĭjango defines a standard API for loading and rendering templates regardless Backends for other template languages mayīe available from third-parties. Own template system, creatively called the Django template language (DTL), andįor the popular alternative Jinja2. For a hands-on example ofĬreating HTML pages with templates, see Tutorial 3.Ī Django project can be configured with one or several template engines (orĮven zero if you don’t use templates). The static parts of the desired HTML output as well as some special syntaxĭescribing how dynamic content will be inserted. The most common approach relies on templates. Being a web framework, Django needs a convenient way to generate HTMLĭynamically.
0 Comments
Leave a Reply. |