diff options
author | Martin Green <martin.speleo@gmail.com> | 2022-06-21 22:43:06 +0100 |
---|---|---|
committer | Martin Green <martin.speleo@gmail.com> | 2022-06-21 22:43:06 +0100 |
commit | 843bfa8ba62c1d187647a2eda5f071beefc44a7e (patch) | |
tree | 1f10a4977150145fefd51f67d4a61be5b70c29d7 /core/views/expo.py | |
parent | 654f8e8c6cde1b2e5f39712c28fe1fbe227681e7 (diff) | |
download | troggle-843bfa8ba62c1d187647a2eda5f071beefc44a7e.tar.gz troggle-843bfa8ba62c1d187647a2eda5f071beefc44a7e.tar.bz2 troggle-843bfa8ba62c1d187647a2eda5f071beefc44a7e.zip |
test to find out locale set in the WSGI enivroment
Diffstat (limited to 'core/views/expo.py')
-rw-r--r-- | core/views/expo.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/views/expo.py b/core/views/expo.py index 1efa0e6..277cb7f 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -342,6 +342,12 @@ def editexpopage(request, path): pageform = ExpoPageForm({"html": body, "title": title}) else: body = "### File not found ###\n" + str(filepath) + import sys + import locale + body = body + "\nsys.getdefaultencoding() = " + sys.getdefaultencoding() + body = body + "\nsys.getfilesystemencoding() = " + sys.getfilesystemencoding() + body = body + "\nlocale.getdefaultlocale() = " + locale.getdefaultlocale() + body = body + "\nlocale.getpreferredencoding() = " + locale.getpreferredencoding() pageform = ExpoPageForm({"html": body, "title": "Missing"}) return render(request, 'editexpopage.html', {'path': path, 'form': pageform, }) |