From: zuber Date: Thu, 5 Nov 2009 23:32:51 +0000 (+0100) Subject: Ustawianie poprawnych ścieżek w interfejsie administracyjnym do przydzielania galerii. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/113e9584a18733aabe8a2ec20862eb6f5ed4b62d?ds=sidebyside;hp=--cc Ustawianie poprawnych ścieżek w interfejsie administracyjnym do przydzielania galerii. --- 113e9584a18733aabe8a2ec20862eb6f5ed4b62d diff --git a/apps/explorer/admin.py b/apps/explorer/admin.py index 097514a9..c84a5d93 100644 --- a/apps/explorer/admin.py +++ b/apps/explorer/admin.py @@ -15,7 +15,7 @@ class GalleryAdminForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(GalleryAdminForm, self).__init__(*args, **kwargs) - self.fields['subpath'].choices = [(x, x) for x in os.listdir(settings.MEDIA_ROOT + settings.IMAGE_DIR)] + self.fields['subpath'].choices = [(settings.IMAGE_DIR + '/' + x, x) for x in os.listdir(settings.MEDIA_ROOT + settings.IMAGE_DIR)] class Meta: mode = explorer.models.GalleryForDocument