Пример #1
0
    def init_on_load(self):
        """
        Precompute a natural sorting, locale aware sorting key.

        Song sorting is performance sensitive operation.
        To get maximum speed lets precompute the sorting key.
        """
        self.sort_key = get_natural_key(self.title)
Пример #2
0
    def init_on_load(self):
        """
        Precompute a natural sorting, locale aware sorting key.

        Song sorting is performance sensitive operation.
        To get maximum speed lets precompute the sorting key.
        """
        self.sort_key = get_natural_key(self.title)
Пример #3
0
 def get_book_key(book):
     """Get the key to sort by"""
     return get_natural_key(book.name)
Пример #4
0
 def get_topic_key(topic):
     """Get the key to sort by"""
     return get_natural_key(topic.name)
Пример #5
0
 def get_author_key(author):
     """Get the key to sort by"""
     return get_natural_key(author.display_name)
Пример #6
0
 def get_cclinumber_key(song):
     """Get the key to sort by"""
     return (get_natural_key(song.ccli_number), song.sort_key)
Пример #7
0
 def get_theme_key(song):
     """Get the key to sort by"""
     return (get_natural_key(song.theme_name), song.sort_key)
Пример #8
0
 def get_songbook_key(result):
     """Get the key to sort by"""
     return (get_natural_key(result[1]), get_natural_key(result[0]), get_natural_key(result[2]))
Пример #9
0
 def get_cclinumber_key(song):
     """Get the key to sort by"""
     return (get_natural_key(song.ccli_number), song.sort_key)
Пример #10
0
 def get_theme_key(song):
     """Get the key to sort by"""
     return (get_natural_key(song.theme_name), song.sort_key)
Пример #11
0
 def get_topic_key(topic):
     """Get the key to sort by"""
     return get_natural_key(topic.name)
Пример #12
0
 def get_songbook_key(result):
     """Get the key to sort by"""
     return (get_natural_key(result[1]), get_natural_key(result[0]), get_natural_key(result[2]))
Пример #13
0
 def get_author_key(author):
     """Get the key to sort by"""
     return get_natural_key(author.display_name)
Пример #14
0
 def get_book_key(book):
     """Get the key to sort by"""
     return get_natural_key(book.name)