Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-django
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ilham Maulana
library-app-django
Commits
a325993e
Commit
a325993e
authored
Jul 02, 2024
by
impfundev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: use postgresql
parent
689a395c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
settings.py
config/settings.py
+8
-4
No files found.
config/settings.py
View file @
a325993e
...
@@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
...
@@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
"""
"""
from
pathlib
import
Path
from
pathlib
import
Path
import
os
from
os
import
getenv
from
dotenv
import
load_dotenv
from
dotenv
import
load_dotenv
# Build paths inside the project like this: BASE_DIR / 'subdir'.
# Build paths inside the project like this: BASE_DIR / 'subdir'.
...
@@ -19,7 +19,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
...
@@ -19,7 +19,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# .env
# .env
load_dotenv
()
load_dotenv
()
JWT_SECRET
=
os
.
getenv
(
"JWT_SECRET"
,
default
=
""
)
JWT_SECRET
=
getenv
(
"JWT_SECRET"
,
default
=
""
)
# Quick-start development settings - unsuitable for production
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
...
@@ -88,8 +88,12 @@ WSGI_APPLICATION = "config.wsgi.application"
...
@@ -88,8 +88,12 @@ WSGI_APPLICATION = "config.wsgi.application"
DATABASES
=
{
DATABASES
=
{
"default"
:
{
"default"
:
{
"ENGINE"
:
"django.db.backends.sqlite3"
,
"ENGINE"
:
"django.db.backends.postgresql"
,
"NAME"
:
BASE_DIR
/
"db.sqlite3"
,
"NAME"
:
getenv
(
"PGDATABASE"
),
"USER"
:
getenv
(
"PGUSER"
),
"PASSWORD"
:
getenv
(
"PGPASSWORD"
),
"HOST"
:
getenv
(
"PGHOST"
),
"PORT"
:
getenv
(
"PGPORT"
,
5432
),
}
}
}
}
...
...
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