Browse Source

[mod] make ISP sort by name case insensitive

Laurent Peuch 10 years ago
parent
commit
85a5ed7968
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ffdnispdb/views.py

+ 2 - 1
ffdnispdb/views.py

@@ -5,6 +5,7 @@ from flask import request, redirect, url_for, abort, \
     current_app, Blueprint
 from flask.ext.babel import gettext as _, get_locale
 from flask.ext.mail import Message
+from sqlalchemy.sql import func, asc
 import itsdangerous
 import docutils.core
 import ispformat.specs
@@ -32,7 +33,7 @@ def home():
 
 @ispdb.route('/isp/')
 def project_list():
-    return render_template('project_list.html', projects=ISP.query.filter_by(is_disabled=False).order_by(ISP.name.asc()))
+    return render_template('project_list.html', projects=ISP.query.filter_by(is_disabled=False).order_by(asc(func.lower(ISP.name))))
 
 
 @ispdb.app_errorhandler(404)