From: Radek Czajka Date: Thu, 7 Oct 2010 14:17:13 +0000 (+0200) Subject: readable error message for no image dir X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/52ac6b59c4e8fcecedb14fb256c2c10e1dc76ce4?ds=inline readable error message for no image dir --- diff --git a/apps/filebrowser/views.py b/apps/filebrowser/views.py index 7870b9d5..7c2967a4 100644 --- a/apps/filebrowser/views.py +++ b/apps/filebrowser/views.py @@ -55,7 +55,7 @@ def browse(request): request.user.message_set.create(message=msg) if directory is None: # The DIRECTORY does not exist, raise an error to prevent eternal redirecting. - raise ImproperlyConfigured(_("Error finding upload directory. Maybe it does not exist?")) + raise ImproperlyConfigured(_("Error finding upload directory: %s. Maybe it does not exist?" % os.path.join(MEDIA_ROOT, DIRECTORY))) redirect_url = reverse("fb_browse") + query_helper(query, "", "dir") return HttpResponseRedirect(redirect_url) abs_path = os.path.join(MEDIA_ROOT, DIRECTORY, path) diff --git a/redakcja/localsettings.sample b/redakcja/localsettings.sample index cdd2949c..c1b1a19b 100644 --- a/redakcja/localsettings.sample +++ b/redakcja/localsettings.sample @@ -12,14 +12,14 @@ from redakcja.settings import * # Path to repository with managed documents -WIKI_REPOSITORY_PATH = '/home/lrekucki/projekty/fundacja/books' +WIKI_REPOSITORY_PATH = '/srv/redakcja/books' -LOGGING_CONFIG_FILE = "/home/lrekucki/projekty/fundacja/redakcja/logging.cfg.dev" +LOGGING_CONFIG_FILE = "/srv/redakcja/logging.cfg.dev" -STATIC_ROOT = '/home/lrekucki/projekty/fundacja/redakcja/redakcja/static/' -MEDIA_ROOT = '/home/lrekucki/projekty/fundacja/media/' +STATIC_ROOT = '/srv/redakcja/static/' +MEDIA_ROOT = '/srv/redakcja/media/' -# Subdirectory of STATIC_ROOT containing images +# Subdirectory of MEDIA_ROOT containing images IMAGE_DIR = 'images' CAS_SERVER_URL = 'http://logowanie.wolnelektury.pl/cas/'