Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hunli12312 opened this issue Jul 14, 2024 · 0 comments
Open

Comments

@hunli12312
Copy link

hunli12312 commented Jul 14, 2024

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

@hunli12312 hunli12312 changed the title Not able to view in inserting image from files while inserting image from url is okay Not able to view in inserting image from files while inserting image Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant