mirror of
https://github.com/MOIS3Y/logs-collector.git
synced 2025-09-13 13:13:01 +02:00
Fix: custom storage path
This commit is contained in:
@@ -139,12 +139,21 @@ STATIC_ROOT = BASE_DIR / 'static'
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
MEDIA_ROOT = BASE_DIR / 'media'
|
||||
MEDIA_URL = 'media/'
|
||||
|
||||
MEDIA_ROOT_FOR_SENSITIVE_FILES = BASE_DIR / 'archives'
|
||||
MEDIA_URL_FOR_SENSITIVE_FILES = '/archives/'
|
||||
MEDIA_ROOT = BASE_DIR / 'archives'
|
||||
|
||||
STORAGES = {
|
||||
# ...
|
||||
"default": {
|
||||
"BACKEND": "django.core.files.storage.FileSystemStorage",
|
||||
"OPTIONS": {
|
||||
"location": MEDIA_ROOT,
|
||||
"base_url": "/archives/",
|
||||
},
|
||||
},
|
||||
"staticfiles": {
|
||||
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
|
||||
},
|
||||
}
|
||||
|
||||
# django-crispy-forms and crispy-bootstrap5
|
||||
# https://django-crispy-forms.readthedocs.io/en/latest/
|
||||
|
@@ -1,4 +1,3 @@
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
@@ -9,8 +8,6 @@ from drf_spectacular.views import (
|
||||
)
|
||||
|
||||
from two_factor.urls import urlpatterns as tf_urls
|
||||
|
||||
from logs_collector import settings
|
||||
from account.utils import AdminSiteOTPRequiredMixinRedirectSetup
|
||||
|
||||
|
||||
@@ -57,8 +54,3 @@ urlpatterns += [
|
||||
name='redoc'
|
||||
),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(
|
||||
settings.MEDIA_URL, document_root=settings.MEDIA_ROOT
|
||||
)
|
||||
|
Reference in New Issue
Block a user