3c85f84dd243c408de26116a72d9386490395d3a
[audio.git] / apps / archive / settings.py
1 # -*- coding: utf-8 -*-
2
3 import os.path
4 from django.conf import settings
5
6 # this is where the end user puts new files
7 try:
8     NEW_PATH = settings.ARCHIVE_NEW_PATH
9 except AttributeError:
10     NEW_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
11                         "archive/new"))
12
13 # here the application keeps its managed files
14 try:
15     FILES_PATH = settings.ARCHIVE_FILES_PATH
16 except AttributeError:
17     FILES_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
18                         "archive/files"))
19
20
21 # here the app keeps the unmanaged (archive) files
22 try:
23     UNMANAGED_PATH = settings.ARCHIVE_UNMANAGED_PATH
24 except AttributeError:
25     UNMANAGED_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
26                         "archive/unmanaged"))
27
28
29 # here the app keeps the resulting (published) files
30 try:
31     FINAL_PATH = settings.ARCHIVE_FINAL_PATH
32 except AttributeError:
33     FINAL_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
34                         "archive/final"))
35
36
37 # here the app keeps temporary build files
38 try:
39     BUILD_PATH = settings.ARCHIVE_BUILD_PATH
40 except AttributeError:
41     BUILD_PATH = os.path.abspath(os.path.join(settings.MEDIA_ROOT,
42                         "archive/build"))
43
44 # upload conf
45 try:
46     UPLOAD_HOST = settings.ARCHIVE_UPLOAD_HOST
47 except AttributeError:
48     UPLOAD_HOST = 'wolnelektury.pl'
49
50 try:
51     UPLOAD_USER = settings.ARCHIVE_UPLOAD_USER
52 except AttributeError:
53     UPLOAD_USER = 'username'
54
55 try:
56     UPLOAD_PASSWORD = settings.ARCHIVE_UPLOAD_PASSWORD
57 except AttributeError:
58     UPLOAD_PASSWORD = None
59
60 try:
61     UPLOAD_PATH = settings.ARCHIVE_UPLOAD_PATH
62 except AttributeError:
63     UPLOAD_PATH = ''
64
65 try:
66     UPLOAD_CMD = settings.ARCHIVE_UPLOAD_CMD
67 except AttributeError:
68     UPLOAD_CMD = '/path/to/manage.py savemedia'
69
70 try:
71     UPLOAD_SUDO = settings.ARCHIVE_UPLOAD_SUDO
72 except AttributeError:
73     UPLOAD_SUDO = None
74
75
76 try:
77     PROJECT = settings.ARCHIVE_PROJECT
78 except AttributeError:
79     PROJECT = u'Wolne Lektury'
80
81 try:
82     LICENSE = settings.ARCHIVE_LICENSE
83 except AttributeError:
84     LICENSE = u'http://creativecommons.org/licenses/by-sa/3.0/deed.pl'
85
86 try:
87     ORGANIZATION = settings.ARCHIVE_ORGANIZATION
88 except AttributeError:
89     ORGANIZATION = u'Fundacja Nowoczesna Polska'
90
91 try:
92     ADVERT = settings.ARCHIVE_ADVERT
93 except AttributeError:
94     ADVERT = u"""
95 Przekaż 1% podatku na rozwój Wolnych Lektur:
96 Fundacja Nowoczesna Polska
97 KRS 0000070056
98 http://nowoczesnapolska.org.pl/wesprzyj_nas/
99 """
100
101 try:
102     COVER_IMAGE = settings.ARCHIVE_COVER_IMAGE
103 except AttributeError:
104     COVER_IMAGE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cover.png')
105