template.loaders.base.Loader.load_template_source()

load_template_source(template_name, template_dirs=None) [source]

Returns a tuple of (template_string, template_origin), where template_string is a string containing the template contents, and template_origin is a string identifying the template source. A filesystem-based loader may return the full path to the file as the template_origin, for example.

template_dirs is an optional argument used to control which directories the loader will search.

This method is called automatically by load_template() and should be overridden when writing custom template loaders.

Deprecated since version 1.9: Custom loaders should use get_template() and get_contents() instead.

doc_Django
2016-10-09 18:39:50
Comments
Leave a Comment

Please login to continue.