aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pygments_api/views.py
diff options
context:
space:
mode:
authorTom Christie2011-04-27 18:28:20 +0100
committerTom Christie2011-04-27 18:28:20 +0100
commitfb805bbb7ca80808258520219330cc5fb3bc0517 (patch)
treece9ce7db8f27041df48d71248b447c61887b04d3 /examples/pygments_api/views.py
parent683a862ddf395d9c57ba323c40d734666d083d37 (diff)
parent116a9ee82486fb31a9132db837569460fe1eb5da (diff)
downloaddjango-rest-framework-fb805bbb7ca80808258520219330cc5fb3bc0517.tar.bz2
Pulling Marko's test fixes
Diffstat (limited to 'examples/pygments_api/views.py')
-rw-r--r--examples/pygments_api/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/pygments_api/views.py b/examples/pygments_api/views.py
index 6fb9217a..377761b1 100644
--- a/examples/pygments_api/views.py
+++ b/examples/pygments_api/views.py
@@ -25,7 +25,7 @@ def list_dir_sorted_by_ctime(dir):
"""Return a list of files sorted by creation time"""
filepaths = [os.path.join(dir, file) for file in os.listdir(dir) if not file.startswith('.')]
return [item[0] for item in sorted([(path, os.path.getctime(path)) for path in filepaths],
- key=operator.itemgetter(1), reverse=True)]
+ key=operator.itemgetter(1), reverse=False)]
def remove_oldest_files(dir, max_files):
"""Remove the oldest files in a directory 'dir', leaving at most 'max_files' remaining.
We use this to limit the number of resources in the sandbox."""