Show More
@@ -112,6 +112,7 b' class AdminSystemInfoSettingsView(BaseAp' | |||
|
112 | 112 | # Platform/Python |
|
113 | 113 | (_('Platform'), val('platform')['name'], state('platform')), |
|
114 | 114 | (_('Platform UUID'), val('platform')['uuid'], state('platform')), |
|
115 | (_('Lang'), val('locale'), state('locale')), | |
|
115 | 116 | (_('Python version'), val('python')['version'], state('python')), |
|
116 | 117 | (_('Python path'), val('python')['executable'], state('python')), |
|
117 | 118 | ('', '', ''), # spacer |
@@ -142,6 +142,21 b' def platform_type():' | |||
|
142 | 142 | return SysInfoRes(value=value) |
|
143 | 143 | |
|
144 | 144 | |
|
145 | def locale_info(): | |
|
146 | import locale | |
|
147 | ||
|
148 | value = dict( | |
|
149 | locale_default=locale.getdefaultlocale(), | |
|
150 | locale_lc_all=locale.getlocale(locale.LC_ALL), | |
|
151 | lang_env=os.environ.get('LANG'), | |
|
152 | lc_all_env=os.environ.get('LC_ALL'), | |
|
153 | local_archive_env=os.environ.get('LOCALE_ARCHIVE'), | |
|
154 | ) | |
|
155 | human_value = 'LANG: {}, locale LC_ALL: {}, Default locales: {}'.format( | |
|
156 | value['lang_env'], value['locale_lc_all'], value['locale_default']) | |
|
157 | return SysInfoRes(value=value, human_value=human_value) | |
|
158 | ||
|
159 | ||
|
145 | 160 | def ulimit_info(): |
|
146 | 161 | data = collections.OrderedDict([ |
|
147 | 162 | ('cpu time (seconds)', resource.getrlimit(resource.RLIMIT_CPU)), |
@@ -712,7 +727,6 b' def usage_info():' | |||
|
712 | 727 | return SysInfoRes(value=value) |
|
713 | 728 | |
|
714 | 729 | |
|
715 | ||
|
716 | 730 | def get_system_info(environ): |
|
717 | 731 | environ = environ or {} |
|
718 | 732 | return { |
@@ -723,6 +737,7 b' def get_system_info(environ):' | |||
|
723 | 737 | 'py_modules': SysInfo(py_modules)(), |
|
724 | 738 | |
|
725 | 739 | 'platform': SysInfo(platform_type)(), |
|
740 | 'locale': SysInfo(locale_info)(), | |
|
726 | 741 | 'server': SysInfo(server_info, environ=environ)(), |
|
727 | 742 | 'database': SysInfo(database_info)(), |
|
728 | 743 | 'ulimit': SysInfo(ulimit_info)(), |
General Comments 0
You need to be logged in to leave comments.
Login now