@@ -1,149 +1,149 | |||||
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.sqlite3', |
|
88 | #'ENGINE': 'django.db.backends.sqlite3', | |
89 | #'NAME': os.path.join(BASE_DIR, 'radarsys.sqlite'), |
|
89 | #'NAME': os.path.join(BASE_DIR, 'radarsys.sqlite'), | |
90 | 'ENGINE': 'django.db.backends.mysql', |
|
90 | 'ENGINE': 'django.db.backends.mysql', | |
91 | 'NAME': 'radarsys', |
|
91 | 'NAME': 'radarsys', | |
92 | 'USER': 'developer', |
|
92 | 'USER': 'developer', | |
93 | #'HOST': 'mysql-radarsys-server', |
|
93 | #'HOST': 'mysql-radarsys-server', | |
94 | 'PASSWORD': 'idi2015', |
|
94 | 'PASSWORD': 'idi2015', | |
95 | 'OPTIONS': { |
|
95 | 'OPTIONS': { | |
96 | 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", |
|
96 | 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", | |
97 | } |
|
97 | } | |
98 | } |
|
98 | } | |
99 | } |
|
99 | } | |
100 |
|
100 | |||
101 |
|
101 | |||
102 | # Internationalization |
|
102 | # Internationalization | |
103 | # https://docs.djangoproject.com/en/1.8/topics/i18n/ |
|
103 | # https://docs.djangoproject.com/en/1.8/topics/i18n/ | |
104 |
|
104 | |||
105 | LANGUAGE_CODE = 'en-us' |
|
105 | LANGUAGE_CODE = 'en-us' | |
106 |
|
106 | |||
107 | TIME_ZONE = None |
|
107 | TIME_ZONE = None | |
108 |
|
108 | |||
109 | USE_I18N = True |
|
109 | USE_I18N = True | |
110 |
|
110 | |||
111 | USE_L10N = True |
|
111 | USE_L10N = True | |
112 |
|
112 | |||
113 | USE_TZ = False |
|
113 | USE_TZ = False | |
114 |
|
114 | |||
115 | # Static files (CSS, JavaScript, Images) |
|
115 | # Static files (CSS, JavaScript, Images) | |
116 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ |
|
116 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ | |
117 |
|
117 | |||
118 |
MEDIA_ROOT = |
|
118 | MEDIA_ROOT = 'media'#os.path.join(BASE_DIR, 'media') | |
119 | MEDIA_URL = '/site_media/' |
|
119 | MEDIA_URL = '/site_media/' | |
120 |
|
120 | |||
121 | STATIC_URL = '/static/' |
|
121 | STATIC_URL = '/static/' | |
122 | #STATIC_ROOT = '/var/www/html/static/' |
|
122 | #STATIC_ROOT = '/var/www/html/static/' | |
123 | STATIC_ROOT = os.path.join(MEDIA_ROOT, 'static') |
|
123 | STATIC_ROOT = os.path.join(MEDIA_ROOT, 'static') | |
124 |
|
124 | |||
125 | #STATICFILES_DIRS = ( |
|
125 | #STATICFILES_DIRS = ( | |
126 | # os.path.join(BASE_DIR, 'apps', 'main', 'static'), |
|
126 | # os.path.join(BASE_DIR, 'apps', 'main', 'static'), | |
127 | # |
|
127 | # | |
128 | #) |
|
128 | #) | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | STATICFILES_FINDERS = ( |
|
131 | STATICFILES_FINDERS = ( | |
132 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
132 | 'django.contrib.staticfiles.finders.FileSystemFinder', | |
133 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
133 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
134 | ) |
|
134 | ) | |
135 |
|
135 | |||
136 | FIXTURE_DIRS = ( |
|
136 | FIXTURE_DIRS = ( | |
137 | os.path.join(BASE_DIR, 'apps', 'rc', 'fixtures'), |
|
137 | os.path.join(BASE_DIR, 'apps', 'rc', 'fixtures'), | |
138 | os.path.join(BASE_DIR, 'apps', 'main', 'fixtures'), |
|
138 | os.path.join(BASE_DIR, 'apps', 'main', 'fixtures'), | |
139 | os.path.join(BASE_DIR, 'apps', 'jars', 'fixtures'), |
|
139 | os.path.join(BASE_DIR, 'apps', 'jars', 'fixtures'), | |
140 | ) |
|
140 | ) | |
141 |
|
141 | |||
142 | # Celery stuff |
|
142 | # Celery stuff | |
143 |
|
143 | |||
144 | BROKER_URL = 'redis://localhost:6379' |
|
144 | BROKER_URL = 'redis://localhost:6379' | |
145 | CELERY_RESULT_BACKEND = 'redis://localhost:6379' |
|
145 | CELERY_RESULT_BACKEND = 'redis://localhost:6379' | |
146 | CELERY_ACCEPT_CONTENT = ['application/json'] |
|
146 | CELERY_ACCEPT_CONTENT = ['application/json'] | |
147 | CELERY_TASK_SERIALIZER = 'json' |
|
147 | CELERY_TASK_SERIALIZER = 'json' | |
148 | CELERY_RESULT_SERIALIZER = 'json' |
|
148 | CELERY_RESULT_SERIALIZER = 'json' | |
149 | CELERY_TIMEZONE = 'America/Lima' |
|
149 | CELERY_TIMEZONE = 'America/Lima' |
@@ -1,30 +1,33 | |||||
1 | """radarsys URL Configuration |
|
1 | """radarsys URL Configuration | |
2 |
|
2 | |||
3 | The `urlpatterns` list routes URLs to views. For more information please see: |
|
3 | The `urlpatterns` list routes URLs to views. For more information please see: | |
4 | https://docs.djangoproject.com/en/1.8/topics/http/urls/ |
|
4 | https://docs.djangoproject.com/en/1.8/topics/http/urls/ | |
5 | Examples: |
|
5 | Examples: | |
6 | Function views |
|
6 | Function views | |
7 | 1. Add an import: from my_app import views |
|
7 | 1. Add an import: from my_app import views | |
8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') |
|
8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') | |
9 | Class-based views |
|
9 | Class-based views | |
10 | 1. Add an import: from other_app.views import Home |
|
10 | 1. Add an import: from other_app.views import Home | |
11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') |
|
11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') | |
12 | Including another URLconf |
|
12 | Including another URLconf | |
13 | 1. Add an import: from blog import urls as blog_urls |
|
13 | 1. Add an import: from blog import urls as blog_urls | |
14 | 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) |
|
14 | 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) | |
15 | """ |
|
15 | """ | |
16 | from django.conf.urls import include, url |
|
16 | from django.conf.urls import include, url | |
17 | from django.contrib import admin |
|
17 | from django.contrib import admin | |
|
18 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |||
18 |
|
19 | |||
19 | urlpatterns = [ |
|
20 | urlpatterns = [ | |
20 | url(r'^admin/', include(admin.site.urls)), |
|
21 | url(r'^admin/', include(admin.site.urls)), | |
21 | url(r'^accounts/', include('apps.accounts.urls')), |
|
22 | url(r'^accounts/', include('apps.accounts.urls')), | |
22 | url(r'^', include('apps.main.urls')), |
|
23 | url(r'^', include('apps.main.urls')), | |
23 | url(r'^rc/', include('apps.rc.urls')), |
|
24 | url(r'^rc/', include('apps.rc.urls')), | |
24 | url(r'^dds/', include('apps.dds.urls')), |
|
25 | url(r'^dds/', include('apps.dds.urls')), | |
25 | url(r'^cgs/', include('apps.cgs.urls')), |
|
26 | url(r'^cgs/', include('apps.cgs.urls')), | |
26 | url(r'^jars/', include('apps.jars.urls')), |
|
27 | url(r'^jars/', include('apps.jars.urls')), | |
27 | url(r'^usrp/', include('apps.usrp.urls')), |
|
28 | url(r'^usrp/', include('apps.usrp.urls')), | |
28 | url(r'^abs/', include('apps.abs.urls')), |
|
29 | url(r'^abs/', include('apps.abs.urls')), | |
29 | url(r'^misc/', include('apps.misc.urls')), |
|
30 | url(r'^misc/', include('apps.misc.urls')), | |
30 | ] |
|
31 | ] | |
|
32 | ||||
|
33 | urlpatterns += staticfiles_urlpatterns() |
General Comments 0
You need to be logged in to leave comments.
Login now