##// END OF EJS Templates
Fix settings and wsgi...
Juan C. Espinoza -
r233:c39ab117891f
parent child
Show More
@@ -1,141 +1,143
1 """
1 """
2 Django settings for radarsys project.
2 Django settings for radarsys project.
3
3
4 Generated by 'django-admin startproject' using Django 1.8.6.
4 Generated by 'django-admin startproject' using Django 1.8.6.
5
5
6 For more information on this file, see
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.8/topics/settings/
7 https://docs.djangoproject.com/en/1.8/topics/settings/
8
8
9 For the full list of settings and their values, see
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.8/ref/settings/
10 https://docs.djangoproject.com/en/1.8/ref/settings/
11 """
11 """
12
12
13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 import os
14 import os
15
15
16 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
16 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
17
17
18 # Quick-start development settings - unsuitable for production
18 # Quick-start development settings - unsuitable for production
19 # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
19 # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
20
20
21 # SECURITY WARNING: keep the secret key used in production secret!
21 # SECURITY WARNING: keep the secret key used in production secret!
22 SECRET_KEY = 'xshb$k5fc-+j16)cvyffj&9u__0q3$l!hieh#+tbzqg)*f^km0'
22 SECRET_KEY = 'xshb$k5fc-+j16)cvyffj&9u__0q3$l!hieh#+tbzqg)*f^km0'
23
23
24 # SECURITY WARNING: don't run with debug turned on in production!
24 # SECURITY WARNING: don't run with debug turned on in production!
25 DEBUG = True
25 DEBUG = True
26
26
27 ALLOWED_HOSTS = []
27 ALLOWED_HOSTS = ['*']
28
28
29 # Application definition
29 # Application definition
30
30
31 INSTALLED_APPS = (
31 INSTALLED_APPS = (
32 'django.contrib.admin',
32 'django.contrib.admin',
33 'django.contrib.auth',
33 'django.contrib.auth',
34 'django.contrib.contenttypes',
34 'django.contrib.contenttypes',
35 'django.contrib.sessions',
35 'django.contrib.sessions',
36 'django.contrib.messages',
36 'django.contrib.messages',
37 'django.contrib.staticfiles',
37 'django.contrib.staticfiles',
38 'bootstrap3',
38 'bootstrap3',
39 'polymorphic',
39 'polymorphic',
40 'apps.accounts',
40 'apps.accounts',
41 'apps.main',
41 'apps.main',
42 'apps.misc',
42 'apps.misc',
43 'apps.rc',
43 'apps.rc',
44 'apps.dds',
44 'apps.dds',
45 'apps.jars',
45 'apps.jars',
46 'apps.usrp',
46 'apps.usrp',
47 'apps.abs',
47 'apps.abs',
48 'apps.cgs',
48 'apps.cgs',
49 )
49 )
50
50
51 MIDDLEWARE_CLASSES = (
51 MIDDLEWARE_CLASSES = (
52 'django.contrib.sessions.middleware.SessionMiddleware',
52 'django.contrib.sessions.middleware.SessionMiddleware',
53 'django.middleware.common.CommonMiddleware',
53 'django.middleware.common.CommonMiddleware',
54 'django.middleware.csrf.CsrfViewMiddleware',
54 'django.middleware.csrf.CsrfViewMiddleware',
55 'django.contrib.auth.middleware.AuthenticationMiddleware',
55 'django.contrib.auth.middleware.AuthenticationMiddleware',
56 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
56 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
57 'django.contrib.messages.middleware.MessageMiddleware',
57 'django.contrib.messages.middleware.MessageMiddleware',
58 'django.middleware.clickjacking.XFrameOptionsMiddleware',
58 'django.middleware.clickjacking.XFrameOptionsMiddleware',
59 'django.middleware.security.SecurityMiddleware',
59 'django.middleware.security.SecurityMiddleware',
60 )
60 )
61
61
62 ROOT_URLCONF = 'radarsys.urls'
62 ROOT_URLCONF = 'radarsys.urls'
63
63
64 TEMPLATES = [
64 TEMPLATES = [
65 {
65 {
66 'BACKEND': 'django.template.backends.django.DjangoTemplates',
66 'BACKEND': 'django.template.backends.django.DjangoTemplates',
67 'DIRS': [os.path.join(BASE_DIR, "templates").replace('\\', '/'),],
67 'DIRS': [os.path.join(BASE_DIR, "templates").replace('\\', '/'),],
68 'APP_DIRS': True,
68 'APP_DIRS': True,
69 'OPTIONS': {
69 'OPTIONS': {
70 'context_processors': [
70 'context_processors': [
71 'django.template.context_processors.debug',
71 'django.template.context_processors.debug',
72 'django.template.context_processors.request',
72 'django.template.context_processors.request',
73 'django.contrib.auth.context_processors.auth',
73 'django.contrib.auth.context_processors.auth',
74 'django.contrib.messages.context_processors.messages',
74 'django.contrib.messages.context_processors.messages',
75 ],
75 ],
76 },
76 },
77 },
77 },
78 ]
78 ]
79
79
80 WSGI_APPLICATION = 'radarsys.wsgi.application'
80 WSGI_APPLICATION = 'radarsys.wsgi.application'
81
81
82
82
83 # Database
83 # Database
84 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
84 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
85
85
86 DATABASES = {
86 DATABASES = {
87 'default': {
87 'default': {
88 'ENGINE': 'django.db.backends.mysql',
88 'ENGINE': 'django.db.backends.sqlite3',
89 'NAME': 'radarsys',
89 'NAME': os.path.join(BASE_DIR, 'radarsys.sqlite'),
90 'USER': 'developer',
90 #'ENGINE': 'django.db.backends.mysql',
91 'PASSWORD': 'idi2015',
91 #'NAME': 'radarsys',
92 'OPTIONS': {
92 #'USER': 'developer',
93 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
93 #'PASSWORD': 'idi2015',
94 }
94 #'OPTIONS': {
95 # 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
96 # }
95 }
97 }
96 }
98 }
97
99
98
100
99 # Internationalization
101 # Internationalization
100 # https://docs.djangoproject.com/en/1.8/topics/i18n/
102 # https://docs.djangoproject.com/en/1.8/topics/i18n/
101
103
102 LANGUAGE_CODE = 'en-us'
104 LANGUAGE_CODE = 'en-us'
103
105
104 TIME_ZONE = None
106 TIME_ZONE = None
105
107
106 USE_I18N = True
108 USE_I18N = True
107
109
108 USE_L10N = True
110 USE_L10N = True
109
111
110 USE_TZ = False
112 USE_TZ = False
111
113
112 # Static files (CSS, JavaScript, Images)
114 # Static files (CSS, JavaScript, Images)
113 # https://docs.djangoproject.com/en/1.8/howto/static-files/
115 # https://docs.djangoproject.com/en/1.8/howto/static-files/
114
116
115 STATIC_URL = '/static/'
117 STATIC_URL = '/static/'
116 STATIC_ROOT = '/var/www/html/static/'
118 STATIC_ROOT = '/var/www/html/static/'
117
119
118 STATICFILES_DIRS = (
120 STATICFILES_DIRS = (
119 os.path.join(BASE_DIR, 'apps', 'main', 'static'),
121 os.path.join(BASE_DIR, 'apps', 'main', 'static'),
120
122
121 )
123 )
122
124
123 STATICFILES_FINDERS = (
125 STATICFILES_FINDERS = (
124 'django.contrib.staticfiles.finders.FileSystemFinder',
126 'django.contrib.staticfiles.finders.FileSystemFinder',
125 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
127 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
126 )
128 )
127
129
128 FIXTURE_DIRS = (
130 FIXTURE_DIRS = (
129 os.path.join(BASE_DIR, 'apps', 'rc', 'fixtures'),
131 os.path.join(BASE_DIR, 'apps', 'rc', 'fixtures'),
130 os.path.join(BASE_DIR, 'apps', 'main', 'fixtures'),
132 os.path.join(BASE_DIR, 'apps', 'main', 'fixtures'),
131
133
132 )
134 )
133
135
134 # Celery stuff
136 # Celery stuff
135
137
136 BROKER_URL = 'redis://localhost:6379'
138 BROKER_URL = 'redis://localhost:6379'
137 CELERY_RESULT_BACKEND = 'redis://localhost:6379'
139 CELERY_RESULT_BACKEND = 'redis://localhost:6379'
138 CELERY_ACCEPT_CONTENT = ['application/json']
140 CELERY_ACCEPT_CONTENT = ['application/json']
139 CELERY_TASK_SERIALIZER = 'json'
141 CELERY_TASK_SERIALIZER = 'json'
140 CELERY_RESULT_SERIALIZER = 'json'
142 CELERY_RESULT_SERIALIZER = 'json'
141 CELERY_TIMEZONE = 'America/Lima' No newline at end of file
143 CELERY_TIMEZONE = 'America/Lima'
@@ -1,16 +1,16
1 """
1 """
2 WSGI config for radarsys project.
2 WSGI config for radarsys project.
3
3
4 It exposes the WSGI callable as a module-level variable named ``application``.
4 It exposes the WSGI callable as a module-level variable named ``application``.
5
5
6 For more information on this file, see
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
7 https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
8 """
8 """
9
9
10 import os
10 import os
11
11
12 from django.core.wsgi import get_wsgi_application
12 from django.core.wsgi import get_wsgi_application
13
13
14 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "radarsys.settings-devel")
14 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "radarsys.settings")
15
15
16 application = get_wsgi_application()
16 application = get_wsgi_application()
General Comments 0
You need to be logged in to leave comments. Login now