Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <class 'django.template.base.TemplateDoesNotExist'>
- sa/templates/beef.py.tpl
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/template/loader.py (Line: 138)
- Function: find_template
- 131 template_source_loaders = tuple(loaders)
- 132 for loader in template_source_loaders:
- 133 try:
- 134 source, display_name = loader(name, dirs)
- 135 return (source, make_origin(display_name, loader, name, dirs))
- 136 except TemplateDoesNotExist:
- 137 pass
- 138 ==> raise TemplateDoesNotExist(name)
- 139
- 140 def find_template_source(name, dirs=None):
- 141 # For backward compatibility
- 142 import warnings
- 143 warnings.warn(
- 144 "`django.template.loader.find_template_source` is deprecated; use `django.template.loader.find_template` instead.",
- Variables:
- dirs = None
- loaders = [<django.template.loaders.filesystem.Loader object at 0x807e154d0>, <django.template.loaders.app_directories.Loader object at 0x807e15790>]
- name = 'sa/templates/beef.py.tpl'
- loader_name = 'django.template.loaders.app_directories.Loader'
- loader = <django.template.loaders.app_directories.Loader object at 0x807e15790>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/template/loader.py (Line: 157)
- Function: get_template
- 150 return template, origin
- 151
- 152 def get_template(template_name):
- 153 """
- 154 Returns a compiled Template object for the given template name,
- 155 handling template inheritance recursively.
- 156 """
- 157 ==> template, origin = find_template(template_name)
- 158 if not hasattr(template, 'render'):
- 159 # template needs to be compiled
- 160 template = get_template_from_string(template, origin, template_name)
- 161 return template
- 162
- 163 def get_template_from_string(source, origin=None, name=None):
- Variables:
- template_name = 'sa/templates/beef.py.tpl'
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/template/loader.py (Line: 181)
- Function: render_to_string
- 174 get_template, or it may be a tuple to use select_template to find one of
- 175 the templates in the list. Returns a string.
- 176 """
- 177 dictionary = dictionary or {}
- 178 if isinstance(template_name, (list, tuple)):
- 179 t = select_template(template_name)
- 180 else:
- 181 ==> t = get_template(template_name)
- 182 if not context_instance:
- 183 return t.render(Context(dictionary))
- 184 # Add the dictionary to the context stack, ensuring it gets removed again
- 185 # to keep the context_instance in the same state it started in.
- 186 context_instance.update(dictionary)
- 187 try:
- Variables:
- template_name = 'sa/templates/beef.py.tpl'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement