· 9 years ago · Oct 05, 2016, 08:18 PM
1import os
2
3BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
4
5
6# Quick-start development settings - unsuitable for production
7# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
8
9# SECURITY WARNING: keep the secret key used in production secret!
10SECRET_KEY = 'crr@+ghh$4#f@!j-r2lc*-8*2_l=40tja5!*wy=q2+a1+c2*g('
11
12# SECURITY WARNING: don't run with debug turned on in production!
13
14DEBUG = True
15
16#MEDIA_ROOT = '/home/indotechsac/webapps/media/'
17#MEDIA_URL = 'http://media.tecsecorp.com/'
18
19
20MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
21MEDIA_URL = '/media/'
22
23
24ALLOWED_HOSTS = [
25'tecsecorp.com',
26'www.tecsecorp.com',
27'static.tecsecorp.com',
28'media.tecsecorp.com',
29]
30
31
32# Application definition
33
34INSTALLED_APPS = (
35 'django.contrib.admin',
36 'django.contrib.auth',
37 'django.contrib.contenttypes',
38 'django.contrib.sessions',
39 'django.contrib.messages',
40 'django.contrib.staticfiles',
41 'apps.webtsc'
42)
43
44MIDDLEWARE_CLASSES = (
45 'django.contrib.sessions.middleware.SessionMiddleware',
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 'django.middleware.security.SecurityMiddleware',
53)
54
55ROOT_URLCONF = 'tsc.urls'
56
57TEMPLATES = [
58 {
59 'BACKEND': 'django.template.backends.django.DjangoTemplates',
60 'DIRS': [],
61 'APP_DIRS': True,
62 'OPTIONS': {
63 'context_processors': [
64 'django.template.context_processors.debug',
65 'django.template.context_processors.request',
66 'django.contrib.auth.context_processors.auth',
67 'django.contrib.messages.context_processors.messages',
68 ],
69 },
70 },
71]
72
73WSGI_APPLICATION = 'tsc.wsgi.application'
74
75
76# Database
77
78DATABASES = {
79 'default': {
80 'ENGINE': 'django.db.backends.sqlite3',
81 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
82 }
83}
84
85
86# Internationalization
87
88LANGUAGE_CODE = 'es-PE'
89
90TIME_ZONE = 'America/Lima'
91
92USE_I18N = True
93
94USE_L10N = True
95
96USE_TZ = True
97
98
99
100
101
102STATIC_ROOT = '/home/indotechsac/webapps/static'
103STATIC_URL = 'http://static.tecsecorp.com/'
104
105# Archivos estaticos generales.
106STATICFILES_DIRS = (
107 os.path.join(BASE_DIR,'static'),
108 )