• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

inventree / InvenTree / 8604849533

08 Apr 2024 06:20PM UTC coverage: 78.857%. First build
8604849533

Pull #6981

github

web-flow
Merge 3d6fa4389 into 4adce85ef
Pull Request #6981: Bump djangorestframework from 3.14.0 to 3.15.1 in /src/backend

19152 of 24287 relevant lines covered (78.86%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/backend/InvenTree/plugin/urls.py
1
"""URL lookup for plugin app."""
2

3
from django.conf import settings
4
from django.urls import include, re_path
5

6
PLUGIN_BASE = 'plugin'  # Constant for links
7

8

9
def get_plugin_urls():
10
    """Returns a urlpattern that can be integrated into the global urls."""
11
    from common.models import InvenTreeSetting
×
12
    from plugin import registry
×
13

14
    urls = []
×
15

16
    # Only allow custom routing if the setting is enabled
17
    if (
18
        InvenTreeSetting.get_setting(
19
            'ENABLE_PLUGINS_URL', False, create=False, cache=False
20
        )
21
        or settings.PLUGIN_TESTING_SETUP
22
    ):
23
        for plugin in registry.plugins.values():
24
            if plugin.mixin_enabled('urls'):
25
                urls.append(plugin.urlpatterns)
26

27
    return re_path(f'^{PLUGIN_BASE}/', include((urls, 'plugin')))
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc