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?hp=54d7b5abd1eddc6f22f8d3df75334a54a1420485 Ustawianie poprawnych ścieżek w interfejsie administracyjnym do przydzielania galerii. --- 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