diff options
| author | Michael Merickel <michael@merickel.org> | 2016-01-31 16:18:02 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2016-01-31 16:18:02 -0600 |
| commit | 3eb1c354d320536ee470b79dcb930d20da93d97d (patch) | |
| tree | 18aa7fa0a4293919c1ed67ee7f8aae6372abcb06 /docs/quick_tour/static_assets | |
| parent | 67f733e161f19bb2b7322edd120b9bf489154536 (diff) | |
| parent | 9c01bf58c211bf9c28f8043459a5a0e9b25a5c35 (diff) | |
| download | pyramid-3eb1c354d320536ee470b79dcb930d20da93d97d.tar.gz pyramid-3eb1c354d320536ee470b79dcb930d20da93d97d.tar.bz2 pyramid-3eb1c354d320536ee470b79dcb930d20da93d97d.zip | |
Merge branch 'master' into feature/alchemy-scaffold-update
Diffstat (limited to 'docs/quick_tour/static_assets')
| -rw-r--r-- | docs/quick_tour/static_assets/app.py | 4 | ||||
| -rw-r--r-- | docs/quick_tour/static_assets/hello_world.jinja2 | 2 | ||||
| -rw-r--r-- | docs/quick_tour/static_assets/hello_world.pt | 16 | ||||
| -rw-r--r-- | docs/quick_tour/static_assets/hello_world_static.jinja2 | 10 | ||||
| -rw-r--r-- | docs/quick_tour/static_assets/views.py | 2 |
5 files changed, 13 insertions, 21 deletions
diff --git a/docs/quick_tour/static_assets/app.py b/docs/quick_tour/static_assets/app.py index 9c808972f..1849c0a5a 100644 --- a/docs/quick_tour/static_assets/app.py +++ b/docs/quick_tour/static_assets/app.py @@ -4,11 +4,9 @@ from pyramid.config import Configurator if __name__ == '__main__': config = Configurator() config.add_route('hello', '/howdy/{name}') - # Start Static 1 config.add_static_view(name='static', path='static') - # End Static 1 config.include('pyramid_jinja2') config.scan('views') app = config.make_wsgi_app() server = make_server('0.0.0.0', 6543, app) - server.serve_forever()
\ No newline at end of file + server.serve_forever() diff --git a/docs/quick_tour/static_assets/hello_world.jinja2 b/docs/quick_tour/static_assets/hello_world.jinja2 index f6862e618..0fb2ce296 100644 --- a/docs/quick_tour/static_assets/hello_world.jinja2 +++ b/docs/quick_tour/static_assets/hello_world.jinja2 @@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <title>Quick Glance</title> + <title>Hello World</title> <link rel="stylesheet" href="/static/app.css"/> </head> <body> diff --git a/docs/quick_tour/static_assets/hello_world.pt b/docs/quick_tour/static_assets/hello_world.pt deleted file mode 100644 index 1797146eb..000000000 --- a/docs/quick_tour/static_assets/hello_world.pt +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head> - <title>Quick Glance</title> - <!-- Start Link 1 --> - <link rel="stylesheet" href="/static/app.css" /> - <!-- End Link 1 --> - <!-- Start Link 2 --> - <link rel="stylesheet" - href="${request.static_url('static/app.css')}" - /> - <!-- End Link 2 --> -</head> -<body> -<h1>Hello ${name}!</h1> -</body> -</html>
\ No newline at end of file diff --git a/docs/quick_tour/static_assets/hello_world_static.jinja2 b/docs/quick_tour/static_assets/hello_world_static.jinja2 new file mode 100644 index 000000000..4fb9be074 --- /dev/null +++ b/docs/quick_tour/static_assets/hello_world_static.jinja2 @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <title>Hello World</title> + <link rel="stylesheet" href="{{ request.static_url('static/app.css') }}"/> +</head> +<body> +<h1>Hello {{ name }}!</h1> +</body> +</html>
\ No newline at end of file diff --git a/docs/quick_tour/static_assets/views.py b/docs/quick_tour/static_assets/views.py index 90730ae32..7dbb45287 100644 --- a/docs/quick_tour/static_assets/views.py +++ b/docs/quick_tour/static_assets/views.py @@ -1,6 +1,6 @@ from pyramid.view import view_config -@view_config(route_name='hello', renderer='hello_world.pt') +@view_config(route_name='hello', renderer='hello_world.jinja2') def hello_world(request): return dict(name=request.matchdict['name']) |
