From 50198935af1f772835a3c26943cbb245295c60e5 Mon Sep 17 00:00:00 2001 From: Paul Oswald Date: Mon, 20 Feb 2012 22:16:51 +0900 Subject: Rename templates to 'base.html', 'api.html', 'api.txt' and 'login.html' --- .../templates/djangorestframework/api.html | 3 + .../templates/djangorestframework/api.txt | 8 ++ .../templates/djangorestframework/api_login.html | 44 ------- .../templates/djangorestframework/base.html | 142 +++++++++++++++++++++ .../djangorestframework/base_renderer.html | 142 --------------------- .../templates/djangorestframework/login.html | 44 +++++++ .../templates/djangorestframework/renderer.html | 3 - .../templates/djangorestframework/renderer.txt | 8 -- 8 files changed, 197 insertions(+), 197 deletions(-) create mode 100644 djangorestframework/templates/djangorestframework/api.html create mode 100644 djangorestframework/templates/djangorestframework/api.txt delete mode 100644 djangorestframework/templates/djangorestframework/api_login.html create mode 100644 djangorestframework/templates/djangorestframework/base.html delete mode 100644 djangorestframework/templates/djangorestframework/base_renderer.html create mode 100644 djangorestframework/templates/djangorestframework/login.html delete mode 100644 djangorestframework/templates/djangorestframework/renderer.html delete mode 100644 djangorestframework/templates/djangorestframework/renderer.txt (limited to 'djangorestframework/templates') diff --git a/djangorestframework/templates/djangorestframework/api.html b/djangorestframework/templates/djangorestframework/api.html new file mode 100644 index 00000000..fd9bcc98 --- /dev/null +++ b/djangorestframework/templates/djangorestframework/api.html @@ -0,0 +1,3 @@ +{% extends "djangorestframework/base.html" %} + +{# Override this template in your own templates directory to customize #} \ No newline at end of file diff --git a/djangorestframework/templates/djangorestframework/api.txt b/djangorestframework/templates/djangorestframework/api.txt new file mode 100644 index 00000000..b584952c --- /dev/null +++ b/djangorestframework/templates/djangorestframework/api.txt @@ -0,0 +1,8 @@ +{% autoescape off %}{{ name }} + +{{ description }} + +HTTP/1.0 {{ response.status }} {{ response.status_text }} +{% for key, val in response.headers.items %}{{ key }}: {{ val }} +{% endfor %} +{{ content }}{% endautoescape %} diff --git a/djangorestframework/templates/djangorestframework/api_login.html b/djangorestframework/templates/djangorestframework/api_login.html deleted file mode 100644 index 07929f0c..00000000 --- a/djangorestframework/templates/djangorestframework/api_login.html +++ /dev/null @@ -1,44 +0,0 @@ -{% load static %} - - - - - - - - -
- - - -
-
-
- {% csrf_token %} -
- {{ form.username }} -
-
- {{ form.password }} - -
-
- -
-
- -
-
-
- - - -
- - diff --git a/djangorestframework/templates/djangorestframework/base.html b/djangorestframework/templates/djangorestframework/base.html new file mode 100644 index 00000000..1d4ae92a --- /dev/null +++ b/djangorestframework/templates/djangorestframework/base.html @@ -0,0 +1,142 @@ + + +{% load urlize_quoted_links %} +{% load add_query_param %} +{% load static %} + + + + {% block extrastyle %}{% endblock %} + {% block title %}Django REST framework - {{ name }}{% endblock %} + {% block extrahead %}{% endblock %} + {% block blockbots %}{% endblock %} + + +
+ + + + + + +
+ + {% if 'OPTIONS' in view.allowed_methods %} +
+ {% csrf_token %} + + +
+ {% endif %} + +
+

{{ name }}

+

{{ description }}

+
+
{{ response.status }} {{ response.status_text }}{% autoescape off %}
+{% for key, val in response.headers.items %}{{ key }}: {{ val|urlize_quoted_links }}
+{% endfor %}
+{{ content|urlize_quoted_links }}
{% endautoescape %}
+ + {% if 'GET' in view.allowed_methods %} +
+
+

GET {{ name }}

+
+ GET + {% for format in available_formats %} + {% with FORMAT_PARAM|add:"="|add:format as param %} + [{{ format }}] + {% endwith %} + {% endfor %} +
+
+
+ {% endif %} + + {# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #} + {% if METHOD_PARAM and response.status != 403 %} + + {% if 'POST' in view.allowed_methods %} +
+
+

POST {{ name }}

+ {% csrf_token %} + {{ post_form.non_field_errors }} + {% for field in post_form %} +
+ {{ field.label_tag }} + {{ field }} + {{ field.help_text }} + {{ field.errors }} +
+ {% endfor %} +
+ +
+
+
+ {% endif %} + + {% if 'PUT' in view.allowed_methods %} +
+
+

PUT {{ name }}

+ + {% csrf_token %} + {{ put_form.non_field_errors }} + {% for field in put_form %} +
+ {{ field.label_tag }} + {{ field }} + {{ field.help_text }} + {{ field.errors }} +
+ {% endfor %} +
+ +
+
+
+ {% endif %} + + {% if 'DELETE' in view.allowed_methods %} +
+
+

DELETE {{ name }}

+ {% csrf_token %} + +
+ +
+
+
+ {% endif %} + + {% endif %} +
+ + +
+ + + {% block footer %}{% endblock %} +
+ + diff --git a/djangorestframework/templates/djangorestframework/base_renderer.html b/djangorestframework/templates/djangorestframework/base_renderer.html deleted file mode 100644 index 1d4ae92a..00000000 --- a/djangorestframework/templates/djangorestframework/base_renderer.html +++ /dev/null @@ -1,142 +0,0 @@ - - -{% load urlize_quoted_links %} -{% load add_query_param %} -{% load static %} - - - - {% block extrastyle %}{% endblock %} - {% block title %}Django REST framework - {{ name }}{% endblock %} - {% block extrahead %}{% endblock %} - {% block blockbots %}{% endblock %} - - -
- - - - - - -
- - {% if 'OPTIONS' in view.allowed_methods %} -
- {% csrf_token %} - - -
- {% endif %} - -
-

{{ name }}

-

{{ description }}

-
-
{{ response.status }} {{ response.status_text }}{% autoescape off %}
-{% for key, val in response.headers.items %}{{ key }}: {{ val|urlize_quoted_links }}
-{% endfor %}
-{{ content|urlize_quoted_links }}
{% endautoescape %}
- - {% if 'GET' in view.allowed_methods %} -
-
-

GET {{ name }}

-
- GET - {% for format in available_formats %} - {% with FORMAT_PARAM|add:"="|add:format as param %} - [{{ format }}] - {% endwith %} - {% endfor %} -
-
-
- {% endif %} - - {# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #} - {% if METHOD_PARAM and response.status != 403 %} - - {% if 'POST' in view.allowed_methods %} -
-
-

POST {{ name }}

- {% csrf_token %} - {{ post_form.non_field_errors }} - {% for field in post_form %} -
- {{ field.label_tag }} - {{ field }} - {{ field.help_text }} - {{ field.errors }} -
- {% endfor %} -
- -
-
-
- {% endif %} - - {% if 'PUT' in view.allowed_methods %} -
-
-

PUT {{ name }}

- - {% csrf_token %} - {{ put_form.non_field_errors }} - {% for field in put_form %} -
- {{ field.label_tag }} - {{ field }} - {{ field.help_text }} - {{ field.errors }} -
- {% endfor %} -
- -
-
-
- {% endif %} - - {% if 'DELETE' in view.allowed_methods %} -
-
-

DELETE {{ name }}

- {% csrf_token %} - -
- -
-
-
- {% endif %} - - {% endif %} -
- - -
- - - {% block footer %}{% endblock %} -
- - diff --git a/djangorestframework/templates/djangorestframework/login.html b/djangorestframework/templates/djangorestframework/login.html new file mode 100644 index 00000000..07929f0c --- /dev/null +++ b/djangorestframework/templates/djangorestframework/login.html @@ -0,0 +1,44 @@ +{% load static %} + + + + + + + + +
+ + + +
+
+
+ {% csrf_token %} +
+ {{ form.username }} +
+
+ {{ form.password }} + +
+
+ +
+
+ +
+
+
+ + + +
+ + diff --git a/djangorestframework/templates/djangorestframework/renderer.html b/djangorestframework/templates/djangorestframework/renderer.html deleted file mode 100644 index 01ca5543..00000000 --- a/djangorestframework/templates/djangorestframework/renderer.html +++ /dev/null @@ -1,3 +0,0 @@ -{% extends "djangorestframework/base_renderer.html" %} - -{# Override this template in your own templates directory to customize #} \ No newline at end of file diff --git a/djangorestframework/templates/djangorestframework/renderer.txt b/djangorestframework/templates/djangorestframework/renderer.txt deleted file mode 100644 index b584952c..00000000 --- a/djangorestframework/templates/djangorestframework/renderer.txt +++ /dev/null @@ -1,8 +0,0 @@ -{% autoescape off %}{{ name }} - -{{ description }} - -HTTP/1.0 {{ response.status }} {{ response.status_text }} -{% for key, val in response.headers.items %}{{ key }}: {{ val }} -{% endfor %} -{{ content }}{% endautoescape %} -- cgit v1.2.3