mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
use namespaces for urls
This commit is contained in:
parent
22ee631af5
commit
3edabc810e
@ -179,7 +179,7 @@ urlpatterns = [
|
|||||||
url(r'^api-doc/', include_docs_urls(title='InvenTree API')),
|
url(r'^api-doc/', include_docs_urls(title='InvenTree API')),
|
||||||
|
|
||||||
# plugins
|
# plugins
|
||||||
url(f'^{settings.PLUGIN_URL}/', include(interation_urls)),
|
url(f'^{settings.PLUGIN_URL}/', include((interation_urls, 'plugin'))),
|
||||||
|
|
||||||
url(r'^markdownx/', include('markdownx.urls')),
|
url(r'^markdownx/', include('markdownx.urls')),
|
||||||
]
|
]
|
||||||
|
@ -64,7 +64,7 @@ class UrlsMixin:
|
|||||||
retruns the urlpatterns for this plugin
|
retruns the urlpatterns for this plugin
|
||||||
"""
|
"""
|
||||||
if self.has_urls:
|
if self.has_urls:
|
||||||
return url(f'^{self.plugin_name()}/', include(self.urls), name=self.plugin_name())
|
return url(f'^{self.plugin_name()}/', include((self.urls, self.plugin_name())), name=self.plugin_name())
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -35,7 +35,7 @@ class SampleIntegrationPlugin(SettingsMixin, UrlsMixin, NavigationMixin, Integra
|
|||||||
}
|
}
|
||||||
|
|
||||||
NAVIGATION= [
|
NAVIGATION= [
|
||||||
{'name': 'SampleIntegration', 'link': 'SampleIntegrationPlugin:hi'},
|
{'name': 'SampleIntegration', 'link': 'plugin:SampleIntegrationPlugin:hi'},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user