【发布时间】:2013-06-19 06:40:30
【问题描述】:
我使用 Google App 引擎 + Python +Jinja2 和 MySQL 数据库创建了一个简单的网站。该网站有一个主页 (index.html),使用 Python 代码中的 Jinja2 渲染,数据从 MySQL 数据库加载。
在 index.html 页面上,我创建了一个水平菜单(关于、主页、服务、产品)。
当我单击关于时,我想加载一个新的 HTML 页面(比如 About.html)。同样,当我单击产品时,(我想加载 Products.Html)。这里我想嵌入一个pdf文件。
我不确定如何添加这些额外的 HTML 页面。有人可以建议。
这是我的 App.yaml 文件。
application: ckappnotes
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: .*
script: stn.app
libraries:
- name: jinja2
version: latest
我已将这些行添加到 App.yaml。
- url: /
static_files: DTD.html
upload: DTD.html
- url: /
static_files: S1.pdf
upload: S1.pdf
这样做会覆盖我原来的 index.html 页面。
【问题讨论】:
标签: python google-app-engine pdf