在配置第八章程序的过程中,出现了一下错误
jinja2.exceptions.UndefinedError: the template 'bootstrap/pagination.html' (imported on line 2 in 'blog/index.html') does not export the requested name 'render_pager'
Traceback (most recent call last):
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask_![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)compat.py", line 35, in reraise
raise value
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask_![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)compat.py", line 35, in reraise
raise value
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask_debugtoolbar_init_.py", line 125, in dispatch_request
return view_func(**req.view_args)
File "D:\bluelog\bluelog\blueprints![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)blog.py", line 26, in index
return render_template('blog/index.html', pagination=pagination, posts=posts)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)templating.py", line 135, in render_template
context, ctx.app)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\flask![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)templating.py", line 117, in _render
rv = template.render(context)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\jinja2![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\jinja2![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\jinja2![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "c:\users\常笑妍.virtualenvs\bluelog-yniw-osi\lib\site-packages\jinja2_![](file:///C:\Users\lenovo\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "D:\bluelog\bluelog\templates\blog\index.html", line 2, in top-level template code
{% from 'bootstrap/pagination.html' import render_pager %}
File "D:\bluelog\bluelog\templates\base.html", line 81, in top-level template code
{% block content %}{% endblock content %}
File "D:\bluelog\bluelog\templates\blog\index.html", line 15, in block "content"
<div class="page-footer">{{ render_pager(pagination) }}</div>
jinja2.exceptions.UndefinedError: the template 'bootstrap/pagination.html' (imported on line 2 in 'blog/index.html') does not export the requested name 'render_pager'
重新配置依旧是这个错误