9c05b7010d4be49f2c8e5a5a60143524838f6150
[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_PATH = settings.ARCHIVE_UPLOAD_PATH
57 except AttributeError:
58     UPLOAD_PATH = ''
59
60 try:
61     UPLOAD_CMD = settings.ARCHIVE_UPLOAD_CMD
62 except AttributeError:
63     UPLOAD_CMD = '/path/to/manage.py savemedia'
64
65 try:
66     UPLOAD_SUDO = settings.ARCHIVE_UPLOAD_SUDO
67 except AttributeError:
68     UPLOAD_SUDO = None
69
70
71 try:
72     PROJECT = settings.ARCHIVE_PROJECT
73 except AttributeError:
74     PROJECT = u'Wolne Lektury'
75
76 try:
77     LICENSE = settings.ARCHIVE_LICENSE
78 except AttributeError:
79     LICENSE = u'http://creativecommons.org/licenses/by-sa/3.0/deed.pl'
80
81 try:
82     ORGANIZATION = settings.ARCHIVE_ORGANIZATION
83 except AttributeError:
84     ORGANIZATION = u'Fundacja Nowoczesna Polska'
85
86 try:
87     ADVERT = settings.ARCHIVE_ADVERT
88 except AttributeError:
89     ADVERT = u"""
90 Przekaż 1% podatku na rozwój Wolnych Lektur:
91 Fundacja Nowoczesna Polska
92 KRS 0000070056
93 http://nowoczesnapolska.org.pl/wesprzyj_nas/
94 """
95
96 try:
97     COVER_IMAGE = settings.ARCHIVE_COVER_IMAGE
98 except AttributeError:
99     COVER_IMAGE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cover.png')
100