fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd1cb90
)
Sortowanie listy plików i folderów w get_image_folders i get_images_from_folder....
author
zuber
<marek@stepniowski.com>
Thu, 20 Aug 2009 10:15:19 +0000
(12:15 +0200)
committer
zuber
<marek@stepniowski.com>
Thu, 20 Aug 2009 10:15:19 +0000
(12:15 +0200)
apps/explorer/models.py
patch
|
blob
|
history
diff --git
a/apps/explorer/models.py
b/apps/explorer/models.py
index
5fa93ad
..
1f8e93d
100644
(file)
--- a/
apps/explorer/models.py
+++ b/
apps/explorer/models.py
@@
-4,11
+4,11
@@
from django.conf import settings
def get_image_folders():
def get_image_folders():
- return
[fn for fn in os.listdir(os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR)) if not fn.startswith('.')]
+ return
sorted(fn for fn in os.listdir(os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR)) if not fn.startswith('.'))
def get_images_from_folder(folder):
def get_images_from_folder(folder):
- return
[
settings.MEDIA_URL + settings.IMAGE_DIR + '/' + folder + '/' + fn for fn
+ return
sorted(
settings.MEDIA_URL + settings.IMAGE_DIR + '/' + folder + '/' + fn for fn
in os.listdir(os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, folder))
in os.listdir(os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, folder))
- if not fn.startswith('.')
]
+ if not fn.startswith('.')
)