Mercurial > sat_legacy_website
annotate sat_website/local_settings.py @ 145:bb392a2dc07b
arizuka website is offline, change URL to archive.org
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 17 Oct 2017 04:44:39 +0200 |
parents | 6652924221ba |
children |
rev | line source |
---|---|
24
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
1 # -*- coding: utf-8 -*- |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
2 """ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
3 Django LOCAL settings for sat_website project, typically to be imported from |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
4 the main settings.py file (see http://stackoverflow.com/a/4909964). |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
5 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
6 For more information on this file, see |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
7 https://docs.djangoproject.com/en/1.7/topics/settings/ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
8 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
9 For the full list of settings and their values, see |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
10 https://docs.djangoproject.com/en/1.7/ref/settings/ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
11 """ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
12 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
14 import os |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
15 BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
16 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
17 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
18 # Quick-start development settings - unsuitable for production |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
19 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
20 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
21 # SECURITY WARNING: keep the secret key used in production secret! |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
22 SECRET_KEY = '{{ secret_key }}' |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
23 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
24 # SECURITY WARNING: don't run with debug turned on in production! |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
25 DEBUG = True |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
26 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
27 TEMPLATE_DEBUG = DEBUG |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
28 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
29 |
41
1a0f24401866
send adhesion form results via email to the admins and the new member
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
30 # Email settings |
1a0f24401866
send adhesion form results via email to the admins and the new member
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
31 |
1a0f24401866
send adhesion form results via email to the admins and the new member
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
32 # print email to stdout instead of actually sending it |
65 | 33 # EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
41
1a0f24401866
send adhesion form results via email to the admins and the new member
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
34 |
65 | 35 FORM_FROM_EMAIL = 'no-reply@example.net' |
66 | 36 FORM_TO_EMAILS = ['email@example.net'] |
41
1a0f24401866
send adhesion form results via email to the admins and the new member
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
37 |
1a0f24401866
send adhesion form results via email to the admins and the new member
souliane <souliane@mailoo.org>
parents:
40
diff
changeset
|
38 |
24
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
39 # Application definition |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
40 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
41 INSTALLED_APPS = ( |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
42 'django.contrib.admin', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
43 'django.contrib.auth', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
44 'django.contrib.contenttypes', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
45 'django.contrib.sessions', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
46 'django.contrib.messages', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
47 'django.contrib.staticfiles', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
48 'markdown_deux', # https://github.com/trentm/django-markdown-deux |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
49 'sat_website', # needed to load the apps in templatetags |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
50 ) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
51 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
52 MIDDLEWARE_CLASSES = ( |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
53 'django.contrib.sessions.middleware.SessionMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
54 'django.middleware.locale.LocaleMiddleware', # after SessionMiddleWare AND before CommonMiddleWare |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
55 'django.middleware.common.CommonMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
56 'django.middleware.csrf.CsrfViewMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
57 'django.contrib.auth.middleware.AuthenticationMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
58 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
59 'django.contrib.messages.middleware.MessageMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
60 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
61 ) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
62 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
63 ROOT_URLCONF = 'sat_website.urls' |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
64 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
65 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
66 # Database |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
67 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
68 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
69 DATABASES = { |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
70 'default': { |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
71 'ENGINE': 'django.db.backends.sqlite3', |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
72 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
73 } |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
74 } |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
75 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
76 # Internationalization |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
77 # https://docs.djangoproject.com/en/1.7/topics/i18n/ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
78 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
79 LANGUAGE_CODE = 'en-us' |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
80 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
81 TIME_ZONE = 'Europe/Paris' |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
82 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
83 USE_I18N = True |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
84 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
85 USE_L10N = True |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
86 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
87 USE_TZ = True |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
88 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
89 LOCALE_PATHS = ("locale",) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
90 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
91 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
92 # Static files (CSS, JavaScript, Images) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
93 # https://docs.djangoproject.com/en/1.7/howto/static-files/ |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
94 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
95 STATIC_URL = '/static/' |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
96 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
97 STATICFILES_DIRS = ( |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
98 os.path.join(BASE_DIR, 'static'), |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
99 ) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
100 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
101 # Templates |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
102 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
103 TEMPLATE_DIRS = ( |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
104 os.path.join(BASE_DIR, 'templates'), |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
105 ) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
106 |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
107 # Options for SàT website (see README) |
c6a3ca0429dd
add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
108 |
58
746e53efc188
allow large media files (screencasts) to be stored on an external server
souliane <souliane@mailoo.org>
parents:
57
diff
changeset
|
109 # External URL pointing the external media files |
79
6652924221ba
change external base URLs from FTP to HTTP
souliane <souliane@mailoo.org>
parents:
71
diff
changeset
|
110 MEDIA_EXTERNAL_URL = 'http://ftp.goffi.org/media' |
58
746e53efc188
allow large media files (screencasts) to be stored on an external server
souliane <souliane@mailoo.org>
parents:
57
diff
changeset
|
111 |
39 | 112 # External URL pointing the projects archives directory |
79
6652924221ba
change external base URLs from FTP to HTTP
souliane <souliane@mailoo.org>
parents:
71
diff
changeset
|
113 PROJECTS_EXTERNAL_URL = 'http://ftp.goffi.org' |
39 | 114 |
115 # Internal path to the the projects archives directory | |
60 | 116 PROJECTS_INTERNAL_PATH = '/srv/ftp' |
39 | 117 |
118 # List of couples with the project directory name and the project name (set to None if it's the same) | |
119 PROJECTS_NAMES = [('sat', None), ('sat_media', None), ('urwid-satext', 'urwid_satext'), ('sat_pubsub', None), ('libervia', None)] | |
120 | |
121 # Extension used to name the project archives | |
122 ARCHIVE_SUFFIX = '.tar.bz2' | |
123 | |
124 # URL to Libervia online demo | |
31
31d196cf3b34
add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents:
24
diff
changeset
|
125 LIBERVIA_DEMO_URL = 'https://www.libervia.org' |
31d196cf3b34
add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents:
24
diff
changeset
|
126 |
39 | 127 # Actual and target number of members |
31
31d196cf3b34
add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents:
24
diff
changeset
|
128 ASSO_MEMBERS_ACTUAL = 3400 |
31d196cf3b34
add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents:
24
diff
changeset
|
129 ASSO_MEMBERS_TARGET = 6000 |
39 | 130 |
131 # Actual and target amount to finance the association (in euros) | |
132 ASSO_FINANCE_ACTUAL = 40000 | |
31
31d196cf3b34
add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents:
24
diff
changeset
|
133 ASSO_FINANCE_TARGET = 60000 |
39 | 134 |
135 # Subscription amounts as defined in the Rules of Procedure | |
31
31d196cf3b34
add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents:
24
diff
changeset
|
136 ASSO_SUBSCR_AMOUNTS = (0, 10, 20, 30, 50, 80, 100) |
40
dfe7139dae0a
add links to the statutes and rules of the association in the adhesion form
souliane <souliane@mailoo.org>
parents:
39
diff
changeset
|
137 |
60 | 138 # Path the CSV file where all the subscriptions are written |
139 ASSO_SUBSCR_CSV = "/home/souliane/sat_website_subscriptions.csv" | |
140 | |
58
746e53efc188
allow large media files (screencasts) to be stored on an external server
souliane <souliane@mailoo.org>
parents:
57
diff
changeset
|
141 # Bank account information |
57
bfa8009f0769
improve the subscription form
souliane <souliane@mailoo.org>
parents:
41
diff
changeset
|
142 ASSO_IBAN = u"FR76 1027 8060 4300 0207 3220 109" |
bfa8009f0769
improve the subscription form
souliane <souliane@mailoo.org>
parents:
41
diff
changeset
|
143 ASSO_BIC = u"CMCIFR2A" |
bfa8009f0769
improve the subscription form
souliane <souliane@mailoo.org>
parents:
41
diff
changeset
|
144 |
40
dfe7139dae0a
add links to the statutes and rules of the association in the adhesion form
souliane <souliane@mailoo.org>
parents:
39
diff
changeset
|
145 # URL to the Statutes and Rules of the association |
dfe7139dae0a
add links to the statutes and rules of the association in the adhesion form
souliane <souliane@mailoo.org>
parents:
39
diff
changeset
|
146 ASSO_URL_STATUTES = 'http://repos.goffi.org/sat_docs/raw-file/tip/association/statuts.pdf' |
dfe7139dae0a
add links to the statutes and rules of the association in the adhesion form
souliane <souliane@mailoo.org>
parents:
39
diff
changeset
|
147 ASSO_URL_RULES = 'http://repos.goffi.org/sat_docs/raw-file/tip/association/r%C3%A8glement%20int%C3%A9rieur.pdf' |
60 | 148 |