From: zuber Date: Tue, 18 Aug 2009 21:07:59 +0000 (+0200) Subject: Merge branch 'master' of git@stigma.nowoczesnapolska.org.pl:platforma X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/7513f67e2fbf40299cf37f27cd383b301bd821f4?hp=77c7ccaf2f09308a537ffd30edc0477dde11d74a Merge branch 'master' of git@stigma.nowoczesnapolska.org.pl:platforma --- diff --git a/apps/explorer/models.py b/apps/explorer/models.py index 3b5848b7..5fa93ad6 100644 --- a/apps/explorer/models.py +++ b/apps/explorer/models.py @@ -4,11 +4,11 @@ from django.conf import settings def get_image_folders(): - return [fn for fn in os.listdir(settings.IMAGE_DIR) if not fn.startswith('.')] + return [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): - return ['/media/images/' + folder + '/' + fn for fn - in os.listdir(os.path.join(settings.IMAGE_DIR, folder)) + return [settings.MEDIA_URL + settings.IMAGE_DIR + '/' + folder + '/' + fn for fn + in os.listdir(os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, folder)) if not fn.startswith('.')] diff --git a/project/settings.py b/project/settings.py index aad5a882..5632527f 100644 --- a/project/settings.py +++ b/project/settings.py @@ -105,7 +105,7 @@ INSTALLED_APPS = ( ) REPOSITORY_PATH = '/Users/zuber/Projekty/platforma/files/books' -IMAGE_DIR = '/Users/zuber/Projekty/platforma/files/images' +IMAGE_DIR = 'images' try: from localsettings import *