mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add settings url
This commit is contained in:
parent
c850269bd7
commit
357f63180f
@ -9,6 +9,7 @@ from datetime import datetime
|
||||
import pathlib
|
||||
|
||||
from django.conf.urls import url, include
|
||||
from django.urls.base import reverse
|
||||
from django.conf import settings
|
||||
from django.utils.text import slugify
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
@ -362,6 +363,11 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
||||
return self.__module__
|
||||
return pathlib.Path(self.def_path).relative_to(settings.BASE_DIR)
|
||||
|
||||
@property
|
||||
def settings_url(self):
|
||||
"""returns url to the settings panel"""
|
||||
return f'{reverse("settings")}#select-plugin-{self.slug}'
|
||||
|
||||
# region mixins
|
||||
def mixin(self, key):
|
||||
"""check if mixin is registered"""
|
||||
|
Loading…
Reference in New Issue
Block a user