iredadmin-ose / controllers / ldap / admin.py

Diff from to

controllers/ldap/admin.py

 # Author: Zhang Huangbin <zhb@iredmail.org>
 
 import web
-from libs import languages, settings
+import settings
+from libs import languages
 from libs.ldaplib import decorators, admin, domain as domainlib, connUtils
 
-cfg = web.iredconfig
 session = web.config.get('_session')
 
 #
     def GET(self):
         i = web.input()
         return web.render('ldap/admin/create.html',
-                          languagemaps=languages.getLanguageMaps(),
-                          default_language=cfg.general.get('lang', 'en_US'),
-                          min_passwd_length=cfg.general.get('min_passwd_length'),
-                          max_passwd_length=cfg.general.get('max_passwd_length'),
+                          languagemaps=languages.get_language_maps(),
+                          default_language=settings.default_language,
+                          min_passwd_length=settings.min_passwd_length,
+                          max_passwd_length=settings.max_passwd_length,
                           msg=i.get('msg'),
                          )
 
                     mail=self.mail,
                     profile_type=self.profile_type,
                     profile=self.admin_profile,
-                    languagemaps=languages.getLanguageMaps(),
+                    languagemaps=languages.get_language_maps(),
                     allDomains=self.allDomains,
                     msg=i.get('msg', None),
                 )
                               mail=self.mail,
                               profile_type=self.profile_type,
                               profile=self.admin_profile,
-                              min_passwd_length=cfg.general.get('min_passwd_length'),
-                              max_passwd_length=cfg.general.get('max_passwd_length'),
+                              min_passwd_length=settings.min_passwd_length,
+                              max_passwd_length=settings.max_passwd_length,
                               msg=i.get('msg', None),
                              )
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.