diff options
| author | Paul Oswald | 2012-02-15 10:31:56 +0900 |
|---|---|---|
| committer | Paul Oswald | 2012-02-15 10:38:25 +0900 |
| commit | bf717eff6420af78a41e1359cdd7b9e409076281 (patch) | |
| tree | 6e9d30165d6c72bed19e5e904741582f56aeb4d5 /docs/howto/setup.rst | |
| parent | cbd0752740b4dfb054179f68ca330b8ac212ec77 (diff) | |
| download | django-rest-framework-bf717eff6420af78a41e1359cdd7b9e409076281.tar.bz2 | |
Documentation on how to override the template; Closes Issue #165
Diffstat (limited to 'docs/howto/setup.rst')
| -rw-r--r-- | docs/howto/setup.rst | 13 |
1 files changed, 13 insertions, 0 deletions
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 %} + <h1 id="site-name">My API</h1> + {% endblock %} + + Markdown -------- |
