0

什么会导致视图中的 django 运行时错误?

(抱歉,这不是一个好问题。我有点不知道如何解决这个问题,甚至不知道如何提出问题。)

当我访问我的视图时,我得到了 RuntimeError。

RuntimeError at /
maximum recursion depth exceeded
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Django Version: 1.4.3
Exception Type: RuntimeError
Exception Value:    
maximum recursion depth exceeded
Exception Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py in compile_string, line 151
Python Executable:  /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python



  145.             t = get_template(template_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py" in get_template
  145.     template, origin = find_template(template_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py" in find_template
  134.             source, display_name = loader(name, dirs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py" in __call__
  42.         return self.load_template(template_name, template_dirs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py" in load_template
  48.             template = get_template_from_string(source, origin, template_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py" in get_template_from_string
  156.     return Template(source, origin, name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py" in __init__
  125.         self.nodelist = compile_string(template_string, origin)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py" in compile_string
  151.     lexer = lexer_class(template_string, origin)

Exception Type: RuntimeError at /
Exception Value: maximum recursion depth exceeded
4

0 回答 0