Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sage Validation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
Sage Validation
Commits
587f8e05
Commit
587f8e05
authored
2 weeks ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Refactor settings
parent
223778d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sage_validation/settings.py
+19
-19
19 additions, 19 deletions
sage_validation/settings.py
with
19 additions
and
19 deletions
sage_validation/settings.py
+
19
−
19
View file @
587f8e05
...
...
@@ -70,8 +70,8 @@ TEMPLATES = [
"
django.template.context_processors.request
"
,
"
django.contrib.auth.context_processors.auth
"
,
"
django.contrib.messages.context_processors.messages
"
,
'
social_django.context_processors.backends
'
,
'
social_django.context_processors.login_redirect
'
,
"
social_django.context_processors.backends
"
,
"
social_django.context_processors.login_redirect
"
,
],
},
},
...
...
@@ -84,24 +84,24 @@ WSGI_APPLICATION = "sage_validation.wsgi.application"
DATABASES
=
{
"
default
"
:
{
'
ENGINE
'
:
'
django.db.backends.postgresql
'
,
'
NAME
'
:
os
.
getenv
(
"
POSTGRES_DB_NAME
"
,
"
sage_validation_db
"
),
'
USER
'
:
os
.
getenv
(
"
POSTGRES_DB_USER
"
,
"
sage_user
"
),
'
PASSWORD
'
:
os
.
getenv
(
"
POSTGRES_DB_PASSWORD
"
,
"
sage_password
"
),
'
HOST
'
:
os
.
getenv
(
"
POSTGRES_DB_HOST
"
,
"
localhost
"
),
'
PORT
'
:
os
.
getenv
(
"
POSTGRES_DB_PORT
"
,
"
5432
"
),
"
ENGINE
"
:
"
django.db.backends.postgresql
"
,
"
NAME
"
:
os
.
getenv
(
"
POSTGRES_DB_NAME
"
,
"
sage_validation_db
"
),
"
USER
"
:
os
.
getenv
(
"
POSTGRES_DB_USER
"
,
"
sage_user
"
),
"
PASSWORD
"
:
os
.
getenv
(
"
POSTGRES_DB_PASSWORD
"
,
"
sage_password
"
),
"
HOST
"
:
os
.
getenv
(
"
POSTGRES_DB_HOST
"
,
"
localhost
"
),
"
PORT
"
:
os
.
getenv
(
"
POSTGRES_DB_PORT
"
,
"
5432
"
),
},
"
meo
"
:
{
'
ENGINE
'
:
'
mssql
'
,
'
NAME
'
:
os
.
getenv
(
"
MSSQL_DB_NAME
"
,
""
),
'
USER
'
:
os
.
getenv
(
"
MSSQL_DB_USER
"
,
""
),
'
PASSWORD
'
:
os
.
getenv
(
"
MSSQL_DB_PASSWORD
"
,
""
),
'
HOST
'
:
os
.
getenv
(
"
MSSQL_DB_HOST
"
,
"
localhost
"
),
'
PORT
'
:
os
.
getenv
(
"
MSSQL_DB_PORT
"
,
""
),
"
ENGINE
"
:
"
mssql
"
,
"
NAME
"
:
os
.
getenv
(
"
MSSQL_DB_NAME
"
,
""
),
"
USER
"
:
os
.
getenv
(
"
MSSQL_DB_USER
"
,
""
),
"
PASSWORD
"
:
os
.
getenv
(
"
MSSQL_DB_PASSWORD
"
,
""
),
"
HOST
"
:
os
.
getenv
(
"
MSSQL_DB_HOST
"
,
"
localhost
"
),
"
PORT
"
:
os
.
getenv
(
"
MSSQL_DB_PORT
"
,
""
),
'
OPTIONS
'
:
{
'
driver
'
:
'
ODBC Driver 18 for SQL Server
'
,
'
extra_params
'
:
'
TrustServerCertificate=Yes;
'
"
OPTIONS
"
:
{
"
driver
"
:
"
ODBC Driver 18 for SQL Server
"
,
"
extra_params
"
:
"
TrustServerCertificate=Yes;
"
},
},
...
...
@@ -155,7 +155,7 @@ STATICFILES_DIRS = [
]
MEDIA_ROOT
=
os
.
getenv
(
"
MEDIA_ROOT
"
,
BASE_DIR
/
"
media
"
)
MEDIA_URL
=
'
/media/
'
MEDIA_URL
=
"
/media/
"
CSRF_TRUSTED_ORIGINS
=
os
.
getenv
(
"
CSRF_TRUSTED_ORIGINS
"
,
""
).
split
(
"
,
"
)
AUTHENTICATION_BACKENDS
=
(
...
...
@@ -168,6 +168,6 @@ SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = os.getenv("SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET",
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE
=
[
"
email
"
,
"
profile
"
]
SOCIAL_AUTH_GOOGLE_OAUTH2_REDIRECT_URI
=
os
.
getenv
(
"
SOCIAL_AUTH_GOOGLE_OAUTH2_REDIRECT_URI
"
,
""
)
SOCIAL_AUTH_JSONFIELD_ENABLED
=
True
SOCIAL_AUTH_URL_NAMESPACE
=
'
social
'
SOCIAL_AUTH_URL_NAMESPACE
=
"
social
"
LOGIN_REDIRECT_URL
=
"
/
"
LOGOUT_REDIRECT_URL
=
"
/
"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment