custom pages tests templates now in repo

This commit is contained in:
Simon Willison 2020-10-07 15:16:41 -07:00
commit b37431976c
10 changed files with 15 additions and 33 deletions

View file

@ -0,0 +1 @@
{{ custom_status(202) }}202!

View file

@ -0,0 +1 @@
ABOUT! view_name:{{ view_name }}

View file

@ -0,0 +1 @@
{{ custom_header("content-type", "application/xml") }}<?xml ...>

View file

@ -0,0 +1 @@
{{ custom_header("x-this-is-foo", "foo") }}FOO{{ custom_header("x-this-is-bar", "bar") }}BAR

View file

@ -0,0 +1 @@
Nest!

View file

@ -0,0 +1 @@
{{ custom_redirect("/example") }}

View file

@ -0,0 +1 @@
{{ custom_redirect("/example", 301) }}

View file

@ -0,0 +1 @@
path:{{ request.path }}

View file

@ -0,0 +1,2 @@
{% if name == "OhNo" %}{{ raise_404("Oh no") }}{% endif %}
<p>Hello from {{ name }}</p>