2 from django.conf import settings
4 # this is where the end user puts new files
6 NEW_PATH = settings.ARCHIVE_NEW_PATH
8 NEW_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
11 # here the application keeps its managed files
13 FILES_PATH = settings.ARCHIVE_FILES_PATH
14 except AttributeError:
15 FILES_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
18 _media_root = os.path.abspath(settings.MEDIA_ROOT)
19 if FILES_PATH.startswith(_media_root):
20 FILES_SAVE_PATH = FILES_PATH[len(_media_root):].lstrip('/')
23 # here the app keeps the unmanaged (archive) files
25 UNMANAGED_PATH = settings.ARCHIVE_UNMANAGED_PATH
26 except AttributeError:
27 UNMANAGED_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
31 # here the app keeps the resulting (published) files
33 FINAL_PATH = settings.ARCHIVE_FINAL_PATH
34 except AttributeError:
35 FINAL_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
39 # here the app keeps temporary build files
41 BUILD_PATH = settings.ARCHIVE_BUILD_PATH
42 except AttributeError:
43 BUILD_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
54 PROJECT = settings.ARCHIVE_PROJECT
55 except AttributeError:
56 PROJECT = 'Wolne Lektury'
59 LICENSE = settings.ARCHIVE_LICENSE
60 except AttributeError:
61 LICENSE = 'http://creativecommons.org/licenses/by-sa/3.0/deed.pl'
64 ORGANIZATION = settings.ARCHIVE_ORGANIZATION
65 except AttributeError:
66 ORGANIZATION = 'Fundacja Nowoczesna Polska'
69 ADVERT = settings.ARCHIVE_ADVERT
70 except AttributeError:
72 Przekaż 1% podatku na rozwój Wolnych Lektur:
73 Fundacja Nowoczesna Polska
75 http://nowoczesnapolska.org.pl/wesprzyj_nas/
79 COVER_IMAGE = settings.ARCHIVE_COVER_IMAGE
80 except AttributeError:
81 COVER_IMAGE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cover.png')