Преглед на файлове

made sorting case insensitive in list view

joel
Simon Bowie преди 1 година
родител
ревизия
a57453c2c5
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. +1
    -1
      web/app/book.py
  2. +1
    -1
      web/app/practice.py
  3. +1
    -1
      web/app/tool.py

+ 1
- 1
web/app/book.py Целия файл

@@ -41,7 +41,7 @@ def get_books():
append_relationships_multiple(books)
else:
# reorder books by book name
books = sorted(books, key=lambda d: d.__dict__['name'])
books = sorted(books, key=lambda d: d.__dict__['name'].lower())
# get values for filters
# practices
practices_filter = Resource.query.filter_by(type='practice').with_entities(Resource.id, Resource.name).all()

+ 1
- 1
web/app/practice.py Целия файл

@@ -30,7 +30,7 @@ def get_practices():
append_relationships_multiple(practices)
else:
# reorder practices by practice name
practices = sorted(practices, key=lambda d: d.__dict__['name'])
practices = sorted(practices, key=lambda d: d.__dict__['name'].lower())
return render_template('resources.html', resources=practices, type='practice', count=count, view=view)

# route for displaying a single practice based on the ID in the database

+ 1
- 1
web/app/tool.py Целия файл

@@ -44,7 +44,7 @@ def get_tools():
append_relationships_multiple(tools)
else:
# reorder tools by tools name
tools = sorted(tools, key=lambda d: d.__dict__['name'])
tools = sorted(tools, key=lambda d: d.__dict__['name'].lower())
# get values for filters
# practices
practices_filter = Resource.query.filter_by(type='practice').with_entities(Resource.id, Resource.name).all()

Loading…
Отказ
Запис