Andriy Kornatskyy avatar Andriy Kornatskyy committed 35fc164

Return list_names as sorted tuple.

Comments (0)

Files changed (1)

src/wheezy/template/loader.py

                     name = os.path.join(dirpath, filename)[pathlen:]
                     name = name.replace('\\', '/')
                     names.append(name)
-        return tuple(names)
+        return tuple(sorted(names))
 
     def get_fullname(self, name):
         """ Returns a full path by a template name.
     def list_names(self):
         """ List all keys from internal dict.
         """
-        return tuple(self.templates.keys())
+        return tuple(sorted(self.templates.keys()))
 
     def load(self, name):
         """ Returns template by name.
         names = set()
         for loader in self.loaders:
             names |= set(loader.list_names())
-        return tuple(names)
+        return tuple(sorted(names))
 
     def load(self, name):
         """ Returns template by name from the first loader that succeed.
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.