mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
show base url in settings
This commit is contained in:
parent
ca1fce4cf3
commit
dafed332bc
@ -3,6 +3,7 @@
|
||||
import logging
|
||||
|
||||
from django.conf.urls import url, include
|
||||
from django.conf import settings
|
||||
import plugins.plugin as plugin
|
||||
|
||||
|
||||
@ -30,6 +31,10 @@ class IntegrationPlugin(plugin.InvenTreePlugin):
|
||||
return self.urlpatterns
|
||||
return None
|
||||
|
||||
@property
|
||||
def base_url(self):
|
||||
return f'{settings.PLUGIN_URL}/{self.plugin_name()}/'
|
||||
|
||||
@property
|
||||
def urlpatterns(self):
|
||||
"""
|
||||
|
@ -22,4 +22,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if plugin.has_urls %}
|
||||
<h4>{% trans "URLs" %}</h4>
|
||||
|
||||
<p>{% blocktrans with base=plugin.base_url %}The Base-URL for this plugin is <strong>{{ base }}</strong>.{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user