comparison sat_website/local_settings.py @ 24:c6a3ca0429dd

add local_settings.py and instructions to run the website locally
author souliane <souliane@mailoo.org>
date Sat, 17 Jan 2015 21:37:19 +0100
parents
children 31d196cf3b34
comparison
equal deleted inserted replaced
23:2fdbf8ebb72b 24:c6a3ca0429dd
1 # -*- coding: utf-8 -*-
2 """
3 Django LOCAL settings for sat_website project, typically to be imported from
4 the main settings.py file (see http://stackoverflow.com/a/4909964).
5
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.7/topics/settings/
8
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.7/ref/settings/
11 """
12
13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 import os
15 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
16
17
18 # Quick-start development settings - unsuitable for production
19 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
20
21 # SECURITY WARNING: keep the secret key used in production secret!
22 SECRET_KEY = '{{ secret_key }}'
23
24 # SECURITY WARNING: don't run with debug turned on in production!
25 DEBUG = True
26
27 TEMPLATE_DEBUG = DEBUG
28
29
30 # Application definition
31
32 INSTALLED_APPS = (
33 'django.contrib.admin',
34 'django.contrib.auth',
35 'django.contrib.contenttypes',
36 'django.contrib.sessions',
37 'django.contrib.messages',
38 'django.contrib.staticfiles',
39 'markdown_deux', # https://github.com/trentm/django-markdown-deux
40 'sat_website', # needed to load the apps in templatetags
41 )
42
43 MIDDLEWARE_CLASSES = (
44 'django.contrib.sessions.middleware.SessionMiddleware',
45 'django.middleware.locale.LocaleMiddleware', # after SessionMiddleWare AND before CommonMiddleWare
46 'django.middleware.common.CommonMiddleware',
47 'django.middleware.csrf.CsrfViewMiddleware',
48 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
50 'django.contrib.messages.middleware.MessageMiddleware',
51 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52 )
53
54 ROOT_URLCONF = 'sat_website.urls'
55
56
57 # Database
58 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
59
60 DATABASES = {
61 'default': {
62 'ENGINE': 'django.db.backends.sqlite3',
63 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
64 }
65 }
66
67 # Internationalization
68 # https://docs.djangoproject.com/en/1.7/topics/i18n/
69
70 LANGUAGE_CODE = 'en-us'
71
72 TIME_ZONE = 'Europe/Paris'
73
74 USE_I18N = True
75
76 USE_L10N = True
77
78 USE_TZ = True
79
80 LOCALE_PATHS = ("locale",)
81
82
83 # Static files (CSS, JavaScript, Images)
84 # https://docs.djangoproject.com/en/1.7/howto/static-files/
85
86 STATIC_URL = '/static/'
87
88 STATICFILES_DIRS = (
89 os.path.join(BASE_DIR, 'static'),
90 )
91
92 # Templates
93
94 TEMPLATE_DIRS = (
95 os.path.join(BASE_DIR, 'templates'),
96 )
97
98 # Options for SàT website (see README)
99
100 SAT_LINK_PATH = '/srv/ftp/sat/sat.tar.bz2'
101 SAT_DL_PREFIX = 'ftp://ftp.goffi.org/sat'
102 #SAT_DL_PATH = 'ftp://ftp.goffi.org/sat/sat.tar.bz2'