mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 16:24:18 +03:00
Add version to html
This commit is contained in:
parent
409ee533fd
commit
50efa10652
|
@ -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,
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user