Skip to content

Not able to view in inserting image from files while inserting image #505

@hunli12312

Description

@hunli12312

I found people had this problem in the very early time. Now I got same problem. I was trying to insert the pics into text box. Then it did show. But after I clicked save, then the pics are gone. I found the pics would become which showed empty in the text boxex. Then I checked the pics were uploaded to the media/django-summernote/2024-07-14 successfully. I have no idea why.

#urls.py

from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings

urlpatterns = [
    path('admin/', admin.site.urls),
    path('users/', include('users.urls')),
    path('', include('travel_apps.urls')),
    path('summernote/', include('django_summernote.urls')),
]

if settings.DEBUG:
   urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
   urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# settings.py
# Media files (Uploaded by users)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')

Django Version 5.0.7
django-summernote Version: 0.8.20.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions