在我的foot.html上,我得到了
<img src="{{static_url('images/logo.png')}}" />
但它不起作用。
UndefinedError: 'static_url' is undefined
我在应用程序中的设置代码:
settings = dict(
blog_title = u"F2E Community",
template_path = os.path.join(os.path.dirname(__file__), "templates"),
static_path = os.path.join(os.path.dirname(__file__), "static"),
xsrf_cookies = True,
cookie_secret = "cookie_secret_code",
login_url = "/login",
autoescape = None,
jinja2 = Environment(loader = FileSystemLoader(os.path.join(os.path.dirname(__file__), "templates")), trim_blocks = True),
reserved = ["user", "topic", "home", "setting", "forgot", "login", "logout", "register", "admin"],
debug=True,
)