Repository: dynaconf/dynaconf

Issue:
dynaconf.contrib.flask_dynaconf.DynaconfConfig to flask.config.Config
Hello, is there a way to convert a dynaconf.contrib.flask_dynaconf.DynaconfConfig object into a flask.config.Config one?
Otherwise, is there a way to convert dynaconf.contrib.flask_dynaconf.DynaconfConfig into a dict?

I have been struggling trying to pass a dynaconf.contrib.flask_dynaconf.DynaconfConfig to a Flask Cache constructor as a config. With flask.config.Config it works but with the dynaconf class it doesn't :-/.
 
cache = Cache().init_app(app, app.config)



Discussion:
hi what is the error message you are getting?

DynaconfConfig is a subclass of flask.config.Config

anyway you can do

```
app.config._settings.as_dict()
```
Actually, none, the cache constructor isn't throwing an error. Nevertheless, the config isn't been add to cache. In fact, I was migrating an old config with dynaconf and before the second argument was a flask.config.Config. 
By the way, great job, you've created an awesome tool. thanks for helping me.

let me know if passing `app.config._settings.as_dict()` works
Thanks for yout answer. I couldn't solve the problem, I've added app.config._settings.as_dict() to the cache constructor the problem is still there. May be my problem isn't there after all.
Nevertheless, I dug deeper and I suspect that may be some of the constants that dynaconf adds to the config (JSON/TOML/YAML/....) might be causing the problem, interfering another entity config.

In my particular scenario the problem I'm having is that swagger api ui isn't launching. in fact, when I browse it, it fails when loading in the lines "jsonEditor: none".

```
const ui = SwaggerUIBundle({
        
          <!-- Flask-Connexion style -->
          url: window.location.origin + "/api/v0" + "/swagger.json",
          oauth2RedirectUrl: window.location.origin + "/api/v0/ui/oauth2-redirect.html",
        
        dom_id: '#swagger-ui',
        <!-- deepLinking: true, -->
        validatorUrl: "None" || false,
        docExpansion: "None",
        jsonEditor: none, X
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        layout: "StandaloneLayout"
      })
```
is it there a way to remove constantes of the config?
@tul1 if that is the problem I can remove some of that constants from dynaconf as YAML/JSON etc are unused / deprecated variables.

Can you confirm if that is the problem?

Before passing the object to cache please try.

```
app.config.unset("JSON")
```

and repeat for every other you wat to remove.

If confirmed the  we update the Flask extension to auotmatically romove it.




Resolving patch:
diff --git a/dynaconf/default_settings.py b/dynaconf/default_settings.py
--- a/dynaconf/default_settings.py
+++ b/dynaconf/default_settings.py
@@ -182,11 +182,6 @@ def reload(*args, **kwargs):
 # debug
 DEBUG_LEVEL_FOR_DYNACONF = get("DEBUG_LEVEL_FOR_DYNACONF", "NOTSET")
 
-YAML = get("YAML", None)
-TOML = get("TOML", None)
-JSON = get("JSON", None)
-INI = get("INI", None)
-
 DOTENV_PATH_FOR_DYNACONF = get("DOTENV_PATH_FOR_DYNACONF", None)
 DOTENV_VERBOSE_FOR_DYNACONF = get("DOTENV_VERBOSE_FOR_DYNACONF", False)
 DOTENV_OVERRIDE_FOR_DYNACONF = get("DOTENV_OVERRIDE_FOR_DYNACONF", False)


Test patch: