Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Classe « Config »

Méthode flask.Config.from_pyfile

Signature de la méthode from_pyfile

def from_pyfile(self, filename: 'str | os.PathLike[str]', silent: 'bool' = False) -> 'bool' 

Description

help(Config.from_pyfile)

Updates the values in the config from a Python file.  This function
behaves as if the file was imported as module with the
:meth:`from_object` function.

:param filename: the filename of the config.  This can either be an
                 absolute filename or a filename relative to the
                 root path.
:param silent: set to ``True`` if you want silent failure for missing
               files.
:return: ``True`` if the file was loaded successfully.

.. versionadded:: 0.7
   `silent` parameter.


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé