deployment stuff
[redakcja.git] / src / redakcja / settings / defaults.py
1 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 import os
5
6 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
7
8 DATABASES = {
9     'default': {
10         'ENGINE': 'django.db.backends.postgresql',
11         'HOST': 'db',
12         'USER': os.environ.get('POSTGRES_USER'),
13         'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
14         'NAME': os.environ.get('POSTGRES_USER'),
15     }
16 }
17
18 DEBUG = False
19
20 ADMINS = (
21     (u'Radek Czajka', 'radoslaw.czajka@nowoczesnapolska.org.pl'),
22 )
23
24 INTERNAL_IPS = ['127.0.0.1']
25
26 MANAGERS = ADMINS
27
28 # Local time zone for this installation. Choices can be found here:
29 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
30 # although not all choices may be available on all operating systems.
31 # If running in a Windows environment this must be set to the same as your
32 # system time zone.
33 TIME_ZONE = 'Europe/Warsaw'
34
35 # Language code for this installation. All choices can be found here:
36 # http://www.i18nguy.com/unicode/language-identifiers.html
37 LANGUAGE_CODE = 'pl'
38
39 SITE_ID = 1
40
41 # If you set this to False, Django will make some optimizations so as not
42 # to load the internationalization machinery.
43 USE_I18N = True
44 USE_L10N = True
45
46
47 # Absolute path to the directory that holds media.
48 # Example: "/home/media/media.lawrence.com/"
49 MEDIA_ROOT = PROJECT_ROOT + '/media/dynamic'
50 STATIC_ROOT = PROJECT_ROOT + '/../static/'
51 CATALOGUE_REPO_PATH = MEDIA_ROOT + '/repo'
52 CATALOGUE_IMAGE_REPO_PATH = MEDIA_ROOT + '/imgrepo'
53
54 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
55 # trailing slash if there is a path component (optional in other cases).
56 # Examples: "http://media.lawrence.com", "http://example.com/media/"
57 MEDIA_URL = '/media/dynamic/'
58 STATIC_URL = '/media/static/'
59
60 SESSION_COOKIE_NAME = "redakcja_sessionid"
61
62 IMAGE_DIR = 'images/'
63
64 BROKER_URL = 'django://'
65
66 SHOW_APP_VERSION = False
67
68 CAS_SERVER_URL = None
69 CAS_APPLY_ATTRIBUTES_TO_USER = True
70 CAS_RENAME_ATTRIBUTES = {
71     'email': 'email', 'firstname': 'first_name', 'lastname': 'last_name'}
72
73
74 LITERARY_DIRECTOR_USERNAME = ''
75
76 LEGIMI_USERNAME = None
77 LEGIMI_PASSWORD = None
78 LEGIMI_PUBLISHER_ID = None
79
80 MIN_COVER_SIZE = (800, 800)
81
82 REMOTE_BUILD_URL = os.environ.get('REMOTE_BUILD_URL')
83 REMOTE_BUILD_TOKEN = os.environ.get('REMOTE_BUILD_TOKEN')