mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
parent
1535fc0565
commit
65046df417
@ -6,6 +6,7 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
import inspect
|
import inspect
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
import pathlib
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@ -337,6 +338,13 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
|||||||
name = getattr(self, 'WEBSITE', None)
|
name = getattr(self, 'WEBSITE', None)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def package_path(self):
|
||||||
|
"""returns the path to the plugin"""
|
||||||
|
if self._is_package:
|
||||||
|
return self.__module__
|
||||||
|
return pathlib.Path(self.def_path).relative_to(settings.BASE_DIR)
|
||||||
|
|
||||||
# mixins
|
# mixins
|
||||||
def mixin(self, key):
|
def mixin(self, key):
|
||||||
"""check if mixin is registered"""
|
"""check if mixin is registered"""
|
||||||
|
@ -71,6 +71,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>{% trans "Installation path" %}</td>
|
||||||
|
<td>{{ plugin.package_path }}</td>
|
||||||
|
</tr>
|
||||||
{% if plugin.is_package == False %}
|
{% if plugin.is_package == False %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-user'></span></td>
|
<td><span class='fas fa-user'></span></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user