From bf717eff6420af78a41e1359cdd7b9e409076281 Mon Sep 17 00:00:00 2001
From: Paul Oswald
Date: Wed, 15 Feb 2012 10:31:56 +0900
Subject: Documentation on how to override the template; Closes Issue #165
---
docs/howto/setup.rst | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'docs/howto')
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst
index 22f98f0c..d018c72d 100644
--- a/docs/howto/setup.rst
+++ b/docs/howto/setup.rst
@@ -29,6 +29,19 @@ but once you move onto a production server, you'll want to make sure you serve t
* Ensure that the ``ADMIN_MEDIA_PREFIX`` is set appropriately and that you are serving the admin media.
(Django's testserver will automatically serve the admin media for you)
+You may customize the templates by creating a new template called ``djangorestframework/renderer.html``
+in your project, extend ``djangorestframework/base_renderer.html`` and override the
+appropriate ``{% block tags %}``. For example::
+
+ {% extends "djangorestframework/base_renderer.html" %}
+
+ {% block title %}My API{% endblock %}
+
+ {% block branding %}
+
My API
+ {% endblock %}
+
+
Markdown
--------
--
cgit v1.2.3
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'
---
docs/howto/setup.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'docs/howto')
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst
index d018c72d..64b58262 100644
--- a/docs/howto/setup.rst
+++ b/docs/howto/setup.rst
@@ -29,11 +29,11 @@ but once you move onto a production server, you'll want to make sure you serve t
* Ensure that the ``ADMIN_MEDIA_PREFIX`` is set appropriately and that you are serving the admin media.
(Django's testserver will automatically serve the admin media for you)
-You may customize the templates by creating a new template called ``djangorestframework/renderer.html``
-in your project, extend ``djangorestframework/base_renderer.html`` and override the
+You may customize the templates by creating a new template called ``djangorestframework/api.html``
+in your project, extend ``djangorestframework/base.html`` and override the
appropriate ``{% block tags %}``. For example::
- {% extends "djangorestframework/base_renderer.html" %}
+ {% extends "djangorestframework/base.html" %}
{% block title %}My API{% endblock %}
--
cgit v1.2.3