annotate sat_website/local_settings.py @ 39:d2c45f4ba57e

add downloads.html
author souliane <souliane@mailoo.org>
date Tue, 27 Jan 2015 18:23:39 +0100
parents 31d196cf3b34
children dfe7139dae0a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
30 # Application definition
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
31
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
32 INSTALLED_APPS = (
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
33 'django.contrib.admin',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
34 'django.contrib.auth',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
35 'django.contrib.contenttypes',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
36 'django.contrib.sessions',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
37 'django.contrib.messages',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
38 'django.contrib.staticfiles',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
39 '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
40 '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
41 )
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
42
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
43 MIDDLEWARE_CLASSES = (
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
44 'django.contrib.sessions.middleware.SessionMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
45 '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
46 'django.middleware.common.CommonMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
47 'django.middleware.csrf.CsrfViewMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
48 'django.contrib.auth.middleware.AuthenticationMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
49 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
50 'django.contrib.messages.middleware.MessageMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
51 'django.middleware.clickjacking.XFrameOptionsMiddleware',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
52 )
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
53
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
54 ROOT_URLCONF = 'sat_website.urls'
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
55
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
56
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
57 # Database
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
58 # 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
59
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
60 DATABASES = {
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
61 'default': {
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
62 'ENGINE': 'django.db.backends.sqlite3',
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
63 '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
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
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
67 # Internationalization
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
68 # 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
69
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
70 LANGUAGE_CODE = 'en-us'
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
71
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
72 TIME_ZONE = 'Europe/Paris'
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 USE_I18N = True
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 USE_L10N = True
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
77
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
78 USE_TZ = True
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
79
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
80 LOCALE_PATHS = ("locale",)
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
81
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 # Static files (CSS, JavaScript, Images)
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
84 # 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
85
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
86 STATIC_URL = '/static/'
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
87
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
88 STATICFILES_DIRS = (
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
89 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
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 # Templates
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
93
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
94 TEMPLATE_DIRS = (
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
95 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
96 )
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
97
c6a3ca0429dd add local_settings.py and instructions to run the website locally
souliane <souliane@mailoo.org>
parents:
diff changeset
98 # 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
99
39
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
100 # External URL pointing the projects archives directory
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
101 PROJECTS_EXTERNAL_PATH = 'ftp://ftp.goffi.org'
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
102
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
103 # Internal path to the the projects archives directory
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
104 PROJECTS_INTERNAL_PATH = '/var/www/projects'
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
105
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
106 # List of couples with the project directory name and the project name (set to None if it's the same)
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
107 PROJECTS_NAMES = [('sat', None), ('sat_media', None), ('urwid-satext', 'urwid_satext'), ('sat_pubsub', None), ('libervia', None)]
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
108
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
109 # Extension used to name the project archives
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
110 ARCHIVE_SUFFIX = '.tar.bz2'
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
111
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
112 # 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
113 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
114
39
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
115 # 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
116 ASSO_MEMBERS_ACTUAL = 3400
31d196cf3b34 add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents: 24
diff changeset
117 ASSO_MEMBERS_TARGET = 6000
39
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
118
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
119 # Actual and target amount to finance the association (in euros)
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
120 ASSO_FINANCE_ACTUAL = 40000
31
31d196cf3b34 add settings ASSO_MEMBERS_*, ASSO_FINANCE_* and LIBERVIA_DEMO_URL
souliane <souliane@mailoo.org>
parents: 24
diff changeset
121 ASSO_FINANCE_TARGET = 60000
39
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
122
d2c45f4ba57e add downloads.html
souliane <souliane@mailoo.org>
parents: 31
diff changeset
123 # 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
124 ASSO_SUBSCR_AMOUNTS = (0, 10, 20, 30, 50, 80, 100)