Anonymous avatar Anonymous committed 014b244

Add version to html

Comments (0)

Files changed (2)

djangorestframework/renderers.py

 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
             'response': self.view.response,
             'description': description,
             'name': name,
+            'version': VERSION,
             'markeddown': markeddown,
             'breadcrumblist': breadcrumb_list,
             'available_media_types': self.view._rendered_media_types,

djangorestframework/templates/renderer.html

   
 	<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 %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.