mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
Add 'About InvenTree' modal
- Accessible from the top-right dropdown menu - Add InvenTree/version.py which contains helper functions
This commit is contained in:
0
InvenTree/part/templatetags/__init__.py
Normal file
0
InvenTree/part/templatetags/__init__.py
Normal file
28
InvenTree/part/templatetags/inventree_extras.py
Normal file
28
InvenTree/part/templatetags/inventree_extras.py
Normal file
@ -0,0 +1,28 @@
|
||||
""" This module provides template tags for extra functionality
|
||||
over and above the built-in Django tags.
|
||||
"""
|
||||
|
||||
from django import template
|
||||
from InvenTree import version
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def multiply(x, y, *args, **kwargs):
|
||||
return x * y
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def inventree_version(*args, **kwargs):
|
||||
return version.inventreeVersion()
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def inventree_commit(*args, **kwargs):
|
||||
return version.inventreeCommitHash()
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def inventree_github(*args, **kwargs):
|
||||
return "https://github.com/InvenTree"
|
Reference in New Issue
Block a user