Web M&M
https://mam.matfyz.cz
12 lines
312 B
12 lines
312 B
1 month ago
|
import os
|
||
|
from urllib.parse import urljoin
|
||
|
|
||
|
from django.conf import settings
|
||
|
from django.core.files.storage import FileSystemStorage
|
||
|
|
||
|
class UploadStorage(FileSystemStorage):
|
||
|
"""Storage pro CKEditor"""
|
||
|
|
||
|
location = os.path.join(settings.MEDIA_ROOT, "uploads")
|
||
|
base_url = urljoin(settings.MEDIA_URL, "uploads/")
|