Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
dima
/
sms-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dfe8e428
authored
May 04, 2018
by
dima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sms_service/settings.py
parent
6d67ec79
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
sms_service/settings.py
sms_service/settings.py
View file @
dfe8e428
...
...
@@ -10,12 +10,12 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import
sys
import
os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
...
...
@@ -27,7 +27,6 @@ DEBUG = True
ALLOWED_HOSTS
=
[]
# Application definition
INSTALLED_APPS
=
[
...
...
@@ -70,16 +69,28 @@ TEMPLATES = [
WSGI_APPLICATION
=
'sms_service.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES
=
{
if
sys
.
platform
.
startswith
(
'linux'
):
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.postgresql_psycopg2'
,
'NAME'
:
'sms_service'
,
'USER'
:
'myprojectuser'
,
'PASSWORD'
:
'password'
,
'HOST'
:
'localhost'
,
'PORT'
:
5432
,
}
}
else
:
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
'NAME'
:
os
.
path
.
join
(
BASE_DIR
,
'db.sqlite3'
),
}
}
}
# Password validation
...
...
@@ -111,7 +122,6 @@ CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER
=
'json'
CELERY_TIMEZONE
=
'Europe/Minsk'
# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/
...
...
@@ -125,13 +135,11 @@ USE_L10N = True
USE_TZ
=
True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL
=
'/static/'
REST_FRAMEWORK
=
{
'DEFAULT_PARSER_CLASSES'
:
(
'rest_framework.parsers.JSONParser'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment