diff options
| author | Tom Christie | 2011-01-04 17:42:23 +0000 |
|---|---|---|
| committer | Tom Christie | 2011-01-04 17:42:23 +0000 |
| commit | f144b769fedd421f3ec24dfd3a4f10c681192337 (patch) | |
| tree | a3ebc0fe0cdd38aad6e3a40f04d62b49fbee51d5 /src/rest/templates | |
| parent | 48c7171aa05cd69ab8d9cd6f3a8eed52f18792a4 (diff) | |
| download | django-rest-framework-f144b769fedd421f3ec24dfd3a4f10c681192337.tar.bz2 | |
Lots of good form validation and default actions
Diffstat (limited to 'src/rest/templates')
| -rw-r--r-- | src/rest/templates/emitter.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rest/templates/emitter.html b/src/rest/templates/emitter.html index f5d0df08..8be41b7c 100644 --- a/src/rest/templates/emitter.html +++ b/src/rest/templates/emitter.html @@ -12,17 +12,17 @@ <h1>{{ resource_name }}</h1> <p>{{ resource_doc }}</p> <pre>{% autoescape off %}<b>{{ status }} {{ reason }}</b> -{% for key, val in headers.items %}<b>{{ key }}:</b> {{ val }} +{% for key, val in headers.items %}<b>{{ key }}:</b> {{ val|urlize_quoted_links }} {% endfor %} {{ content|urlize_quoted_links }}{% endautoescape %} </pre> -{% if 'GET' in allowed_methods %} +{% if 'read' in resource.allowed_operations %} <div class='action'> <a href='{{ request.path }}'>Read</a> </div> {% endif %} -{% if 'POST' in resource.allowed_methods %} +{% if 'create' in resource.allowed_operations %} <div class='action'> <form action="{{ request.path }}" method="POST"> {% csrf_token %} @@ -32,7 +32,7 @@ </div> {% endif %} -{% if 'PUT' in resource.allowed_methods %} +{% if 'update' in resource.allowed_operations %} <div class='action'> <form action="{{ request.path }}" method="POST"> <input type="hidden" name="{{ resource.METHOD_PARAM}}" value="PUT" /> @@ -43,7 +43,7 @@ </div> {% endif %} -{% if 'DELETE' in resource.allowed_methods %} +{% if 'delete' in resource.allowed_operations %} <div class='action'> <form action="{{ request.path }}" method="POST"> {% csrf_token %} |
