Comments (4)
I use this configuration (and it work)
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR,"public/static")
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR,"public/media")
FILE_UPLOAD_PATH = os.path.join(MEDIA_ROOT, 'uploads/')
#FROALA_UPLOAD_PATH = FILE_UPLOAD_PATH
urls.py
import django
from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^froala_editor/', include('froala_editor.urls')),
url(r'^/', include("website.urls")),
]
if settings.DEV:
urlpatterns.append(url(r'^media/(.*)$', django.views.static.serve, {'document_root': settings.MEDIA_ROOT}))
from django-froala-editor.
I'm having the same problem here. The code looks like a work in progress (some lines are commented out for example) and I can't find a view that can resolve URLs of uploaded images, so I'm not sure if it's even supported yet.
from django-froala-editor.
Hi, i not have problem a put this in my settings.py
this code is for django 1.8.x
MEDIA_ROOT = os.environ.get('MEDIA_ROOT', os.path.join(BASE_DIR, 'media'))
MEDIA_URL = '/media/'
STATIC_ROOT = os.environ.get('STATIC_ROOT', os.path.join(BASE_DIR, 'static'))
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static_media"),
)
FROALA_EDITOR_OPTIONS = {
'language': 'es',
other options
}
it's work well,
but i still the error when browser folder -- managed image -- i don't see any my images uploads :(
any why?
thank
from django-froala-editor.
I have a similar problem. When inserting an image, the file gets uploaded to the directory "media" in my app base folder, but it returns error for the uploaded image URL. I have fiddled with MEDIA_ROOT & MEDIA_URL settings but no success. My settings are as below -
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
MEDIA_URL = 'media/'
FROALA_UPLOAD_PATH = os.path.join(BASE_DIR, 'media')
Here is the log snippet from server --
[14/May/2017 00:26:02] "POST /froala_editor/image_upload/ HTTP/1.1" 200 79
Not Found: /media/home/abhi/Projects/djApp/media/home_search_image_O0noYRJ.jpg
[14/May/2017 00:26:02] "GET /media/home/abhi/Projects/djApp/media/home_search_image_O0noYRJ.jpg HTTP/1.1" 404 1922
from django-froala-editor.
Related Issues (20)
- Django 3.2 not supported due to missing db_collation support HOT 1
- Add newer versions to Python Package Index HOT 1
- Using the License Key HOT 1
- 4.0.4 not availbale on PyPI HOT 4
- Is this still maintained? I mean really maintained and not just having js/css files updated?
- missing files froala-django.css and froala-django.js HOT 2
- Static Collection failing on Django 4.0 HOT 3
- Writing a Third Party Plugin HOT 1
- Cant upload photos HOT 1
- json encoding of option should use DjangoJSONEncoder
- image/webp should be added to allowed image types
- Image upload not working HOT 4
- bug report, uploading image with same filename HOT 1
- Can not upload videos HOT 2
- CSS Layers of link "popup" is broke
- Everythign works except the Manage Images
- When will 3.1.1 be pushed out for Django Froala? HOT 1
- No Uploading multiple images
- Django 3.0, admin inlines, throws JS error when new inline formset is added HOT 2
- Maximum call stack size exceeded. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-froala-editor.