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
5ce8e169
Commit
5ce8e169
authored
Aug 12, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: serve media files
parent
6c126aa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
settings.py
config/settings.py
+3
-11
requirements.txt
requirements.txt
+0
-0
No files found.
config/settings.py
View file @
5ce8e169
...
...
@@ -27,11 +27,11 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY
=
os
.
environ
.
get
(
"SECRET_KEY"
)
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
Fals
e
DEBUG
=
Tru
e
ALLOWED_HOSTS
=
[
"localhost"
,
"127.0.0.1"
,
os
.
environ
.
get
(
"IP_HOST"
)
,
"192.168.2.252"
,
"library_app.ilhammaulana.me"
,
]
...
...
@@ -66,8 +66,6 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
# local
"users.middleware.AuthMiddleware"
,
# 3rd party
"whitenoise.middleware.WhiteNoiseMiddleware"
,
]
ROOT_URLCONF
=
"config.urls"
...
...
@@ -150,7 +148,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/5.0/howto/static-files/
STATIC_URL
=
"/static/"
STATIC_ROOT
=
BASE_DIR
/
"static"
STATIC_ROOT
=
BASE_DIR
/
"static
files
"
MEDIA_URL
=
"/media/"
MEDIA_ROOT
=
BASE_DIR
...
...
@@ -178,9 +176,3 @@ EMAIL_HOST_PASSWORD = "83VFaB6ZGSzy72D24T"
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD
=
"django.db.models.BigAutoField"
STORAGES
=
{
"staticfiles"
:
{
"BACKEND"
:
"whitenoise.storage.CompressedManifestStaticFilesStorage"
,
},
}
requirements.txt
View file @
5ce8e169
B
asgiref
==3.8.1
...
...
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