Shabda Raaj
Posts: 72
Nickname: shabda
Registered: Jul, 2007
|
Shabda Raaj is Owner of Usware Technologies, a Django Development Company.
|
|
|
|
Writing your own template loaders
|
Posted: Nov 21, 2009 4:03 AM
|
|
Django has three builtin template loaders which are used to get the templates for rendering.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
Writing your template loader is a awfuly easy. It is a callable which
Returns a tuple of (openfile, filename) if it can find the template.
Raise TemplateDoesNotExist if [...]
Related posts:- A response to Dropping Django
Read: Writing your own template loaders
|
|