Advertisement
Guest User

Untitled

a guest
Feb 27th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. <class 'django.template.base.TemplateDoesNotExist'>
  2. sa/templates/beef.py.tpl
  3. START OF TRACEBACK
  4. ------------------------------------------------------------------------
  5. File: /opt/noc/contrib/lib/django/template/loader.py (Line: 138)
  6. Function: find_template
  7. 131 template_source_loaders = tuple(loaders)
  8. 132 for loader in template_source_loaders:
  9. 133 try:
  10. 134 source, display_name = loader(name, dirs)
  11. 135 return (source, make_origin(display_name, loader, name, dirs))
  12. 136 except TemplateDoesNotExist:
  13. 137 pass
  14. 138 ==> raise TemplateDoesNotExist(name)
  15. 139
  16. 140 def find_template_source(name, dirs=None):
  17. 141 # For backward compatibility
  18. 142 import warnings
  19. 143 warnings.warn(
  20. 144 "`django.template.loader.find_template_source` is deprecated; use `django.template.loader.find_template` instead.",
  21. Variables:
  22. dirs = None
  23. loaders = [<django.template.loaders.filesystem.Loader object at 0x807e154d0>, <django.template.loaders.app_directories.Loader object at 0x807e15790>]
  24. name = 'sa/templates/beef.py.tpl'
  25. loader_name = 'django.template.loaders.app_directories.Loader'
  26. loader = <django.template.loaders.app_directories.Loader object at 0x807e15790>
  27. ------------------------------------------------------------------------
  28. File: /opt/noc/contrib/lib/django/template/loader.py (Line: 157)
  29. Function: get_template
  30. 150 return template, origin
  31. 151
  32. 152 def get_template(template_name):
  33. 153 """
  34. 154 Returns a compiled Template object for the given template name,
  35. 155 handling template inheritance recursively.
  36. 156 """
  37. 157 ==> template, origin = find_template(template_name)
  38. 158 if not hasattr(template, 'render'):
  39. 159 # template needs to be compiled
  40. 160 template = get_template_from_string(template, origin, template_name)
  41. 161 return template
  42. 162
  43. 163 def get_template_from_string(source, origin=None, name=None):
  44. Variables:
  45. template_name = 'sa/templates/beef.py.tpl'
  46. ------------------------------------------------------------------------
  47. File: /opt/noc/contrib/lib/django/template/loader.py (Line: 181)
  48. Function: render_to_string
  49. 174 get_template, or it may be a tuple to use select_template to find one of
  50. 175 the templates in the list. Returns a string.
  51. 176 """
  52. 177 dictionary = dictionary or {}
  53. 178 if isinstance(template_name, (list, tuple)):
  54. 179 t = select_template(template_name)
  55. 180 else:
  56. 181 ==> t = get_template(template_name)
  57. 182 if not context_instance:
  58. 183 return t.render(Context(dictionary))
  59. 184 # Add the dictionary to the context stack, ensuring it gets removed again
  60. 185 # to keep the context_instance in the same state it started in.
  61. 186 context_instance.update(dictionary)
  62. 187 try:
  63. Variables:
  64. template_name = 'sa/templates/beef.py.tpl'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement