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
fd77496a
Commit
fd77496a
authored
Jul 15, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: seperate database dev and prod
parent
be913327
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
settings.py
config/settings.py
+24
-5
No files found.
config/settings.py
View file @
fd77496a
...
@@ -97,14 +97,24 @@ WSGI_APPLICATION = "config.wsgi.application"
...
@@ -97,14 +97,24 @@ WSGI_APPLICATION = "config.wsgi.application"
# Database
# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
# DATABASES = {
# "default": {
# "ENGINE": "django.db.backends.sqlite3",
# "NAME": BASE_DIR / "db.sqlite3",
# }
# }
DATABASES
=
{
DATABASES
=
{
"default"
:
{
"default"
:
{
"ENGINE"
:
"django.db.backends.sqlite3"
,
"ENGINE"
:
"django.db.backends.mysql"
,
"NAME"
:
BASE_DIR
/
"db.sqlite3"
,
"NAME"
:
"library_app_dev"
,
"USER"
:
"root"
,
"PASSWORD"
:
"ilhammaulana13"
,
"HOST"
:
"localhost"
,
"PORT"
:
"3306"
,
}
}
}
}
# Password validation
# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
...
@@ -139,12 +149,21 @@ USE_TZ = True
...
@@ -139,12 +149,21 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/
# https://docs.djangoproject.com/en/5.0/howto/static-files/
STATIC_URL
=
"static/"
STATIC_URL
=
"
/
static/"
STATIC_ROOT
=
BASE_DIR
/
"staticfiles"
STATIC_ROOT
=
BASE_DIR
/
"staticfiles"
MEDIA_URL
=
"media/"
MEDIA_URL
=
"
/
media/"
MEDIA_ROOT
=
BASE_DIR
MEDIA_ROOT
=
BASE_DIR
STORAGES
=
{
"default"
:
{
"BACKEND"
:
"django.core.files.storage.FileSystemStorage"
,
},
"staticfiles"
:
{
"BACKEND"
:
"django.contrib.staticfiles.storage.StaticFilesStorage"
,
},
}
# Default primary key field type
# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
...
...
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