Changeset 717
- Timestamp:
- 09/29/05 08:26:49 (3 years ago)
- Files:
-
- django/trunk/django/core/template_loader.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/template_loader.py
r715 r717 23 23 """ 24 24 Loads the given template_name and renders it with the given dictionary as 25 context. Returns a string. 25 context. The template_name may be a string to load a single template using 26 get_template, or it may be a tuple to use select_template to find one of 27 the templates in the list. Returns a string. 26 28 """ 27 29 dictionary = dictionary or {} 28 t = get_template(template_name) 30 if isinstance(template_name, (list, tuple)): 31 t = select_template(template_name) 32 else: 33 t = get_template(template_name) 29 34 if context_instance: 30 35 context_instance.update(dictionary)
