##// END OF EJS Templates
Se solucionó el mensaje de advertencia HINT por DEFATUL_AUTO_FIELD
Renato-TUF -
r360:3d072a3b4687
parent child
Show More
@@ -1,150 +1,153
1 1 """
2 2 Django settings for radarsys project.
3 3
4 4 Generated by 'django-admin startproject' using Django 1.8.6.
5 5
6 6 For more information on this file, see
7 7 https://docs.djangoproject.com/en/1.8/topics/settings/
8 8
9 9 For the full list of settings and their values, see
10 10 https://docs.djangoproject.com/en/1.8/ref/settings/
11 11 """
12 12
13 13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 14 import os
15 15
16 16 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 17
18 18 # Quick-start development settings - unsuitable for production
19 19 # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
20 20
21 21 # SECURITY WARNING: keep the secret key used in production secret!
22 22 SECRET_KEY = 'xshb$k5fc-+j16)cvyffj&9u__0q3$l!hieh#+tbzqg)*f^km0'
23 23
24 24 # SECURITY WARNING: don't run with debug turned on in production!
25 25 DEBUG = True
26 26
27 27 ALLOWED_HOSTS = ['*']
28 28
29 29 # Application definition
30 30
31 31 INSTALLED_APPS = [
32 32 'django.contrib.admin',
33 33 'django.contrib.auth',
34 34 'django.contrib.contenttypes',
35 35 'django.contrib.sessions',
36 36 'django.contrib.messages',
37 37 'django.contrib.staticfiles',
38 38 'apps.accounts',
39 39 'apps.main',
40 40 'apps.misc',
41 41 'apps.rc',
42 42 'apps.dds',
43 43 'apps.jars',
44 44 'apps.usrp',
45 45 'apps.abs',
46 46 'apps.cgs',
47 47 'apps.dds_rest',
48 48 "django_bootstrap5",
49 49 'polymorphic',
50 50 ]
51 51
52 52 MIDDLEWARE = [
53 53 'django.middleware.security.SecurityMiddleware',
54 54 'django.contrib.sessions.middleware.SessionMiddleware',
55 55 'django.middleware.common.CommonMiddleware',
56 56 'django.middleware.csrf.CsrfViewMiddleware',
57 57 'django.contrib.auth.middleware.AuthenticationMiddleware',
58 58 'django.contrib.messages.middleware.MessageMiddleware',
59 59 'django.middleware.clickjacking.XFrameOptionsMiddleware',
60 60
61 61 ]
62 62
63 63 ROOT_URLCONF = 'radarsys.urls'
64 64
65 65 TEMPLATES = [
66 66 {
67 67 'BACKEND': 'django.template.backends.django.DjangoTemplates',
68 68 'DIRS': [os.path.join(BASE_DIR, "templates")],
69 69 'APP_DIRS': True,
70 70 'OPTIONS': {
71 71 'context_processors': [
72 72 'django.template.context_processors.debug',
73 73 'django.template.context_processors.request',
74 74 'django.contrib.auth.context_processors.auth',
75 75 'django.contrib.messages.context_processors.messages',
76 76 'apps.main.processors.radarsys_globals',
77 77 ],
78 78 },
79 79 },
80 80 ]
81 81
82 82 WSGI_APPLICATION = 'radarsys.wsgi.application'
83 83
84 84
85 85 # Database
86 86 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
87 87
88 88 DATABASES = {
89 89 'default': {
90 90 'ENGINE': 'django.db.backends.sqlite3',
91 91 'NAME': 'radarsys.sqlite',
92 92 }
93 93 # 'default': {
94 94 # 'ENGINE': 'django.db.backends.postgresql_psycopg2',
95 95 # 'NAME': os.environ.get('DB_NAME', 'radarsys'),
96 96 # 'USER': os.environ.get('DB_USER', 'docker'),
97 97 # 'PASSWORD': os.environ.get('DB_PASSWORD', 'docker'),
98 98 # 'HOST': os.environ.get('POSTGRES_PORT_5432_TCP_ADDR', 'localhost'),
99 99 # 'PORT': os.environ.get('POSTGRES_PORT_5432_TCP_PORT', '5400'),
100 100 #}
101 101 }
102 102
103 103 # Internationalization
104 104 # https://docs.djangoproject.com/en/1.8/topics/i18n/
105 105
106 106 LANGUAGE_CODE = 'en-us'
107 107
108 108 USE_TZ = False #True
109 109
110 110 TIME_ZONE = os.environ.get('TZ', 'America/Lima')
111 111
112 112 USE_I18N = True
113 113
114 114 USE_L10N = True
115 115
116 116 # Static files (CSS, JavaScript, Images)
117 117 # https://docs.djangoproject.com/en/1.8/howto/static-files/
118 118
119 119 MEDIA_URL = '/media/'
120 120 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
121 121
122 122 STATIC_URL = '/static/'
123 123 STATIC_ROOT = os.path.join(BASE_DIR, 'static')
124 124
125 125 STATICFILES_FINDERS = (
126 126 'django.contrib.staticfiles.finders.FileSystemFinder',
127 127 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
128 128 )
129 129
130 130 # Celery stuff
131 131
132 132 REDIS_HOST = os.environ.get('REDIS_HOST', 'localhost')
133 133 #REDIS_HOST = os.environ.get('REDIS_HOST', '127.0.0.1')
134 134 REDIS_PORT = os.environ.get('REDIS_PORT', 6379)
135 135
136 136 BROKER_TRANSPORT = 'redis'
137 137 #BROKER_URL = 'redis://{}:{}/0'.format(REDIS_HOST, REDIS_PORT)
138 138 BROKER_URL = 'redis://{}:{}'.format(REDIS_HOST, REDIS_PORT)
139 139
140 140 CELERY_RESULT_BACKEND = 'redis://{}:{}/0'.format(REDIS_HOST, REDIS_PORT)
141 141 CELERY_BROKER_TRANSPORT = BROKER_URL
142 142 CELERY_ACCEPT_CONTENT = ['application/json']
143 143 CELERY_TASK_SERIALIZER = 'json'
144 144 CELERY_RESULT_SERIALIZER = 'json'
145 145 CELERY_ENABLE_UTC = False
146 146 CELERY_TIMEZONE = 'America/Lima'
147 147
148 148 import django
149 149 from django.utils.encoding import force_str
150 150 django.utils.encoding.force_text = force_str
151
152 # choose of auto-created primary keys
153 DEFAULT_AUTO_FIELD='django.db.models.AutoField'
General Comments 0
You need to be logged in to leave comments. Login now