()
| 249 | |
| 250 | |
| 251 | def get_active_plugins(): |
| 252 | if settings.MIGRATING: return [] |
| 253 | |
| 254 | plugins = [] |
| 255 | try: |
| 256 | enabled_plugins = [p.name for p in Plugin.objects.filter(enabled=True).all()] |
| 257 | for plugin in get_plugins(): |
| 258 | if plugin.get_name() in enabled_plugins: |
| 259 | plugins.append(plugin) |
| 260 | except Exception as e: |
| 261 | logger.warning("Cannot get active plugins. If running a migration this is expected: %s" % str(e)) |
| 262 | |
| 263 | return plugins |
| 264 | |
| 265 | |
| 266 | def get_plugin_by_name(name, only_active=True, refresh_cache_if_none=False): |
no test coverage detected