[dev-gnome-web] get_locale: Add documentation



commit 39651ba6c625030af4066ef1b91d6cee0367e07a
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Thu Jan 28 12:16:43 2016 +0100

    get_locale: Add documentation

 server/app.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/server/app.py b/server/app.py
index 2ac8019..c18e82b 100644
--- a/server/app.py
+++ b/server/app.py
@@ -21,6 +21,10 @@ babel = Babel(app)
 
 @babel.localeselector
 def get_locale():
+    """
+    Called before the endpoints are queried to determine the best language from
+    the request headers.
+    """
     return request.accept_languages.best_match(app.config['LANGUAGES'])
 
 # Start ignoring PyImportSortBear and PyLintBear (Those imports use app)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]