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
951a02a1
Commit
951a02a1
authored
Aug 12, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: staticfiles settings
parent
8c784eab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
.gitignore
.gitignore
+1
-0
settings.py
config/settings.py
+5
-2
No files found.
.gitignore
View file @
951a02a1
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
media
media
uploads
uploads
static
static
staticfiles
# Backup files #
# Backup files #
*.bak
*.bak
...
...
config/settings.py
View file @
951a02a1
...
@@ -68,6 +68,8 @@ MIDDLEWARE = [
...
@@ -68,6 +68,8 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
# local
# local
"users.middleware.AuthMiddleware"
,
"users.middleware.AuthMiddleware"
,
# 3rd party
"whitenoise.middleware.WhiteNoiseMiddleware"
,
]
]
ROOT_URLCONF
=
"config.urls"
ROOT_URLCONF
=
"config.urls"
...
@@ -149,8 +151,9 @@ USE_TZ = True
...
@@ -149,8 +151,9 @@ 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"
STATICFILES_DIRS
=
[
BASE_DIR
/
"static"
]
MEDIA_URL
=
"/media/"
MEDIA_URL
=
"/media/"
MEDIA_ROOT
=
BASE_DIR
MEDIA_ROOT
=
BASE_DIR
...
@@ -160,7 +163,7 @@ STORAGES = {
...
@@ -160,7 +163,7 @@ STORAGES = {
"BACKEND"
:
"django.core.files.storage.FileSystemStorage"
,
"BACKEND"
:
"django.core.files.storage.FileSystemStorage"
,
},
},
"staticfiles"
:
{
"staticfiles"
:
{
"BACKEND"
:
"
django.contrib.staticfiles.storage.
StaticFilesStorage"
,
"BACKEND"
:
"
whitenoise.storage.CompressedManifest
StaticFilesStorage"
,
},
},
}
}
...
...
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