models.py
from ckeditor_uploader.fields import RichTextUploadingField
class Name(models.Model):
content=RichTextUploadingField()
settings.py
INSTALLED_APPS=[
...
...
'ckeditor',
'ckeditor_uploader',
...
...
]
CKEDITOR_STORAGE_BACKEND = 'django.core.files.storage.FileSystemStorage'
CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_CONFIGS = { #my_settins_optional
'default': {
'toolbar': 'full',
'width': 'auto',
'font_names': 'quantico; rokkit',
'fontSize_sizes': '21/21px',
'extraPlugins': ','.join(
[
'codesnippet',
'widget',
'dialog',
]),
},
}
STATIC_URL = '/static/'
STATIC_ROOT = '/static/'
MEDIA_ROOT = ''
MEDIA_URL = '/media/'
urls.py
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
...
path('ckeditor/', include('ckeditor_uploader.urls'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
İletişime geçmek, yorum bırakmak veya hatalarımı düzetlmek istersen mail atabilirsin.