Repository: learningequality/kolibri

Issue:
user warnings about plugins are shown every time when kolibri starts
<!--
Instructions:
 * Fill out the sections below, replace …'s with information about your issue
 * Use the 'preview' function above this text box to verify formatting before submitting
-->

### Observed behavior
<!--
Description of the behavior that was observed, including screenshots or other references when applicable
-->

When I started kolibri from a fresh install, I got this warning:
```
/Users/lingyiwang/.venvs/kolibri0.12.6b1/lib/python2.7/site-packages/kolibri/plugins/base.py:87: UserWarning: kolibri.plugins.setup_wizard exposes a KolibriPluginBase derived object but is initialized after Django - enable as a plugin to use this properly
  module=self._module_path()
```
After I created the facility and got navigated to the device page, I got another warning:
```
/Users/lingyiwang/.venvs/kolibri0.12.6b1/lib/python2.7/site-packages/kolibri/plugins/base.py:87: UserWarning: kolibri.plugins.device_management exposes a KolibriPluginBase derived object but is initialized after Django - enable as a plugin to use this properly
  module=self._module_path()
```

### Expected behavior
<!--
Description of what behavior was expected but did not occur
-->

we should try to eliminate the warnings if possible

### User-facing consequences
<!--
Implications and real-world consequences for learners, coaches, admins, and other users of the application
-->

users/developers who check the logs might be confused by these warnings

### Errors and logs
<!--
Relevant logs from:
 * the command line
 * ~/.kolibri/logs/kolibri.txt
 * the browser console

Please wrap errors in triple backticks for clean formatting like this:
```
01:10 info: something happened
01:12 error: something bad happened
```
-->

```
INFO     ENGINE Serving on http://0.0.0.0:8080
INFO     ENGINE Bus STARTED
/Users/lingyiwang/.venvs/kolibri0.12.6b1/lib/python2.7/site-packages/kolibri/plugins/base.py:87: UserWarning: kolibri.plugins.setup_wizard exposes a KolibriPluginBase derived object but is initialized after Django - enable as a plugin to use this properly
  module=self._module_path()
/Users/lingyiwang/.venvs/kolibri0.12.6b1/lib/python2.7/site-packages/kolibri/plugins/base.py:87: UserWarning: kolibri.plugins.device_management exposes a KolibriPluginBase derived object but is initialized after Django - enable as a plugin to use this properly
  module=self._module_path()
INFO     Downloading data for channel id a9b25ac9814742c883ce1b0579448337
```

### Steps to reproduce
<!--
Precise steps that someone else can follow in order to see this behavior
-->

1. get the 0.12.6b1 pex
2. run `python kolibri-0.12.6b1.pex start`
3. open localhost:8080
4. check the log (on Ubuntu, the error appeared in daemon.txt)
5. create the facility
6. check the log again

### Context
<!--
Tell us about your environment, including:
 * Kolibri version
 * Operating system
 * Browser
-->

Kolibri version: 0.12.6b1
Operating System: OSX, Ubuntu Xenial



Discussion:
Looking at this, I think this error is completely erroneous. If the initialization was going to cause a problem, it would be raising an error elsewhere, so this is just noise. Going to remove.

Resolving patch:
diff --git a/kolibri/plugins/base.py b/kolibri/plugins/base.py
--- a/kolibri/plugins/base.py
+++ b/kolibri/plugins/base.py
@@ -7,10 +7,8 @@
 
 import logging
 import sys
-import warnings
 from importlib import import_module
 
-from django.conf import settings
 from django.utils.module_loading import module_has_submodule
 
 from kolibri.utils.conf import config
@@ -79,15 +77,6 @@ class KolibriPluginBase(object):
     # : Suggested property, not yet in use
     collect_static_on_enable = False
 
-    def __init__(self):
-        if settings.configured:
-            # Check to see if a plugin is being initialized after Django
-            warnings.warn(
-                "{module} exposes a KolibriPluginBase derived object but is initialized after Django - enable as a plugin to use this properly".format(
-                    module=self._module_path()
-                )
-            )
-
     @classmethod
     def _module_path(cls):
         """


Test patch: