Merge pull request #1602 from SchrodingersGat/api-increment

Bump API version to 3
This commit is contained in:
Oliver 2021-05-22 21:14:18 +10:00 committed by GitHub
commit 098b9b7597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View File

@ -10,8 +10,15 @@ import common.models
INVENTREE_SW_VERSION = "0.2.2 pre"
# Increment this number whenever there is a significant change to the API that any clients need to know about
INVENTREE_API_VERSION = 2
"""
Increment thi API version number whenever there is a significant change to the API that any clients need to know about
v3 -> 2021-05-22:
- The updated StockItem "history tracking" now uses a different interface
"""
INVENTREE_API_VERSION = 3
def inventreeInstanceName():

View File

@ -119,6 +119,12 @@ def inventree_version(*args, **kwargs):
return version.inventreeVersion()
@register.simple_tag()
def inventree_api_version(*args, **kwargs):
""" Return InvenTree API version """
return version.inventreeApiVersion()
@register.simple_tag()
def django_version(*args, **kwargs):
""" Return Django version string """

View File

@ -29,6 +29,11 @@
{% endif %}
</td>
</tr>
<tr>
<td><span class='fas fa-code'></span></td>
<td>{% trans "API Version" %}</td>
<td>{% inventree_api_version %}{% include "clip.html" %}</td>
</tr>
<tr>
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Django Version" %}</td>