1 # -*- coding: utf-8 -*-
4 from django.conf import settings
6 # this is where the end user puts new files
8 NEW_PATH = settings.ARCHIVE_NEW_PATH
10 NEW_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
13 # here the application keeps its managed files
15 FILES_PATH = settings.ARCHIVE_FILES_PATH
16 except AttributeError:
17 FILES_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
20 if FILES_PATH.startswith(settings.MEDIA_ROOT):
21 FILES_SAVE_PATH = FILES_PATH[len(settings.MEDIA_ROOT):].lstrip('/')
24 # here the app keeps the unmanaged (archive) files
26 UNMANAGED_PATH = settings.ARCHIVE_UNMANAGED_PATH
27 except AttributeError:
28 UNMANAGED_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
32 # here the app keeps the resulting (published) files
34 FINAL_PATH = settings.ARCHIVE_FINAL_PATH
35 except AttributeError:
36 FINAL_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
40 # here the app keeps temporary build files
42 BUILD_PATH = settings.ARCHIVE_BUILD_PATH
43 except AttributeError:
44 BUILD_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
49 UPLOAD_HOST = settings.ARCHIVE_UPLOAD_HOST
50 except AttributeError:
51 UPLOAD_HOST = 'wolnelektury.pl'
54 UPLOAD_USER = settings.ARCHIVE_UPLOAD_USER
55 except AttributeError:
56 UPLOAD_USER = 'username'
59 UPLOAD_PASSWORD = settings.ARCHIVE_UPLOAD_PASSWORD
60 except AttributeError:
61 UPLOAD_PASSWORD = None
64 UPLOAD_PATH = settings.ARCHIVE_UPLOAD_PATH
65 except AttributeError:
69 UPLOAD_CMD = settings.ARCHIVE_UPLOAD_CMD
70 except AttributeError:
71 UPLOAD_CMD = '/path/to/manage.py savemedia'
74 UPLOAD_SUDO = settings.ARCHIVE_UPLOAD_SUDO
75 except AttributeError:
80 PROJECT = settings.ARCHIVE_PROJECT
81 except AttributeError:
82 PROJECT = u'Wolne Lektury'
85 LICENSE = settings.ARCHIVE_LICENSE
86 except AttributeError:
87 LICENSE = u'http://creativecommons.org/licenses/by-sa/3.0/deed.pl'
90 ORGANIZATION = settings.ARCHIVE_ORGANIZATION
91 except AttributeError:
92 ORGANIZATION = u'Fundacja Nowoczesna Polska'
95 ADVERT = settings.ARCHIVE_ADVERT
96 except AttributeError:
98 Przekaż 1% podatku na rozwój Wolnych Lektur:
99 Fundacja Nowoczesna Polska
101 http://nowoczesnapolska.org.pl/wesprzyj_nas/
105 COVER_IMAGE = settings.ARCHIVE_COVER_IMAGE
106 except AttributeError:
107 COVER_IMAGE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cover.png')