Add version to html

This commit is contained in:
Tom Christie 2011-06-25 10:25:26 +01:00
parent 409ee533fd
commit 50efa10652
2 changed files with 3 additions and 1 deletions

View File

@ -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,

View File

@ -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 %}