[Mpuls-commits] r1653 - in waska/trunk: . waskaweb/lib waskaweb/templates

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 17 23:46:28 CET 2010


Author: frank
Date: 2010-02-17 23:46:26 +0100 (Wed, 17 Feb 2010)
New Revision: 1653

Modified:
   waska/trunk/ChangeLog
   waska/trunk/waskaweb/lib/helpers.py
   waska/trunk/waskaweb/templates/login-list.mako
Log:
Process sorted project list instead of randomized dictionary for login-list


Modified: waska/trunk/ChangeLog
===================================================================
--- waska/trunk/ChangeLog	2010-02-17 22:42:33 UTC (rev 1652)
+++ waska/trunk/ChangeLog	2010-02-17 22:46:26 UTC (rev 1653)
@@ -1,5 +1,12 @@
 2010-02-17 	Frank Koormann <frank.koormann at intevation.de>
 
+	* waskaweb/lib/helpers.py (getDbSelectionList()): return item-sorted list
+	instead of dictionary
+
+	* waskaweb/templates/login-list.mako: Process project list instead of dict
+
+2010-02-17 	Frank Koormann <frank.koormann at intevation.de>
+
 	* formed/formedtree_web.xml: Sync accidentially checked in formedtree with 
 	main repository.
 

Modified: waska/trunk/waskaweb/lib/helpers.py
===================================================================
--- waska/trunk/waskaweb/lib/helpers.py	2010-02-17 22:42:33 UTC (rev 1652)
+++ waska/trunk/waskaweb/lib/helpers.py	2010-02-17 22:46:26 UTC (rev 1653)
@@ -272,7 +272,9 @@
 
 def getDbSelectionList():
     global DBS_LIST
-    return DBS_LIST
+    items = DBS_LIST.items()
+    items.sort()
+    return [(key, value) for key, value in items]
 
 def format_date(dt):
     return date2str(dt)

Modified: waska/trunk/waskaweb/templates/login-list.mako
===================================================================
--- waska/trunk/waskaweb/templates/login-list.mako	2010-02-17 22:42:33 UTC (rev 1652)
+++ waska/trunk/waskaweb/templates/login-list.mako	2010-02-17 22:46:26 UTC (rev 1653)
@@ -20,7 +20,7 @@
    <label for="project">${_('login_label_project')}</label>
 </div>
 <select name='DB_NAME_FROM_LIST' size=1>
-    % for k, v in h.getDbSelectionList().iteritems():
+    % for k, v in h.getDbSelectionList():
          <option value="${k}">${v}</option>
     % endfor
 </select></p>



More information about the Mpuls-commits mailing list