aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework
diff options
context:
space:
mode:
authorTom Christie2011-06-25 10:25:26 +0100
committerTom Christie2011-06-25 10:25:26 +0100
commit50efa106529e03eda5607e6c9323838432ce755f (patch)
treeadef80e98baf1d683afe609000698e199d3ce922 /djangorestframework
parent409ee533fd28b742f4e790dc56aa686f44db1fcd (diff)
downloaddjango-rest-framework-50efa106529e03eda5607e6c9323838432ce755f.tar.bz2
Add version to html
Diffstat (limited to 'djangorestframework')
-rw-r--r--djangorestframework/renderers.py2
-rw-r--r--djangorestframework/templates/renderer.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/djangorestframework/renderers.py b/djangorestframework/renderers.py
index 56939bbc..13cd52f5 100644
--- a/djangorestframework/renderers.py
+++ b/djangorestframework/renderers.py
@@ -17,6 +17,7 @@ from djangorestframework.utils import dict2xml, url_resolves
from djangorestframework.utils.breadcrumbs import get_breadcrumbs
from djangorestframework.utils.description import get_name, get_description
from djangorestframework.utils.mediatypes import get_media_type_params, add_media_type_param, media_type_matches
+from djangorestframework import VERSION
from decimal import Decimal
import re
@@ -285,6 +286,7 @@ class DocumentingTemplateRenderer(BaseRenderer):
'response': self.view.response,
'description': description,
'name': name,
+ 'version': VERSION,
'markeddown': markeddown,
'breadcrumblist': breadcrumb_list,
'available_media_types': self.view._rendered_media_types,
diff --git a/djangorestframework/templates/renderer.html b/djangorestframework/templates/renderer.html
index 94748d28..97d3837a 100644
--- a/djangorestframework/templates/renderer.html
+++ b/djangorestframework/templates/renderer.html
@@ -18,7 +18,7 @@
<div id="header">
<div id="branding">
- <h1 id="site-name"><a href='http://django-rest-framework.org'>Django REST framework</a></h1>
+ <h1 id="site-name"><a href='http://django-rest-framework.org'>Django REST framework</a> <small>{{ version }}</small></h1>
</div>
<div id="user-tools">
{% if user.is_active %}Welcome, {{ user }}.{% if logout_url %} <a href='{{ logout_url }}'>Log out</a>{% endif %}{% else %}Anonymous {% if login_url %}<a href='{{ login_url }}'>Log in</a>{% endif %}{% endif %}