Comments (7)
I just started using https://github.com/jose-lpa/django-filebrowser-no-grappelli and his branch looks good except for the "select file" issue. I just wasted like ten hours on this trying to get this working right with TinyMCE.
If you put this in your project's settings file, you'll be able to link to all the file types listed in filebrowser/settings.py EXTENSIONS dictionary. The image, file, and media keys in the following dictionary are used when you click on the image, link, and media icons in TinyMCE's toolbar respectively.
The following settings are for django-tinymce.
FILEBROWSER_SELECT_FORMATS = {
# image is used when you click on "Insert/edit image" icon
'image': ['Image'],
# file is used when you click on "Insert/edit link" icon
'file': ['Folder','Image','Video','Document','Audio','Code'],
# media is probably used when you click on "Insert/edit media" icon
'media': ['Video','Audio'],
}
FYI These are the extensions in filebrowser's settings.py, which you can override.
EXTENSIONS = getattr(settings, "FILEBROWSER_EXTENSIONS", {
'Folder': [''],
'Image': ['.jpg','.jpeg','.gif','.png','.tif','.tiff'],
'Video': ['.mov','.wmv','.mpeg','.mpg','.avi','.rm'],
'Document': ['.pdf','.doc','.rtf','.txt','.xls','.csv'],
'Audio': ['.mp3','.mp4','.wav','.aiff','.midi','.m4p'],
'Code': ['.html','.py','.js','.css']
})
from django-filebrowser-no-grappelli.
Hi,
I am facing the same problem (not seeing the Select Buttons at all). It seems like django-filebrowser-no-grapelli is working fine, but I am making some mistakes in integrating with django-tinymce.
I added the 2 variables in settings.py of filebrowser-
URL_TINYMCE = getattr(settings, "FILEBROWSER_URL_TINYMCE", DEFAULT_URL_TINYMCE)
PATH_TINYMCE = getattr(settings, "FILEBROWSER_PATH_TINYMCE", DEFAULT_PATH_TINYMCE)
Please suggest what extra settings are required.
I installed the below using pip and used with admin site-
Django==1.5.4
django-tinymce==1.5.2
Pillow==2.3.0
django-filebrowser-no-grappelli==3.1.1
I am new to django frameworks, so would be grateful if you could elaborate the further steps required.
Thanks in advance.
Regards,
Gaurav
from django-filebrowser-no-grappelli.
Try using this branch of django-tinymce https://github.com/aljosa/django-tinymce. django-tinymce 1.5.2 is really old. You should use maintained versions of both django-tinymce & django-filebrowser. You shouldn't have to monkey with any apps' settings.py file.
Wardi's branch of django-filebrowser also has issues. He's not merging the fixes that other people have completed. I recommend this branch https://github.com/jose-lpa/django-filebrowser-no-grappelli.
Make sure you have the following in your project's settings.py file (not filebrowser's).
FILEBROWSER_SELECT_FORMATS = {
# image is used when you click on "Insert/edit image" icon
'image': ['Image'],
# file is used when you click on "Insert/edit link" icon
'file': ['Folder','Image','Video','Document','Audio','Code'],
# media is probably used when you click on "Insert/edit media" icon
'media': ['Video','Audio'],
}
I hope you can get it working soon. Good luck.
from django-filebrowser-no-grappelli.
Hi,
I am still facing issues in getting it working. Here is my new Requirements file-
django==1.5.1
Pillow==2.3.0
https://github.com/jose-lpa/django-filebrowser-no-grappelli/zipball/master#egg=filebrowser
https://github.com/aljosa/django-tinymce/zipball/master#egg=tinymce
I reverted all the changes except adding 'FILEBROWSER_SELECT_FORMATS' in settings.py file of my project.
But still getting the same result, Not seeing the select buttons. for any of the filetype.
Please suggest if I am missing something.
Regards,
Gaurav
from django-filebrowser-no-grappelli.
@caa thank you for pointing that out. I've merged jose-lpa's branch
from django-filebrowser-no-grappelli.
@wardi that's great news! Thank you for having a branch of django-filebrowser. It helped me out a lot.
@gauravnagia I noticed there isn't a column for selections. It might be because nothing is selectable. Have you overridden any of filebrowser's templates by any chance?
Here's my other settings in settings.py. Sorry I forgot to include them. PROJECT_PATH is your full project path. This config assumes the static & media folders are in your project directory. You'll probably have to change the paths to suit your project. Hope this helps. I'm using Django 1.6 here.
MEDIA_URL = '/media/'
STATIC_URL = '/static/'
# Django Tinymce app settings
TINYMCE_JS_URL = '/static/tiny_mce/tiny_mce.js'
TINYMCE_JS_ROOT = PROJECT_PATH + 'tiny_mce'
TINYMCE_DEFAULT_CONFIG = {
'theme' : "advanced",
'plugins' : "inlinepopups, paste, media, table, fullscreen",
# Fix Url, Js behaviors
'convert_urls' : False,
'relative_urls' : False,
'valid_elements' : "*[*]",
# Theme options
'theme_advanced_buttons1_add' : "|,fullscreen",
'theme_advanced_buttons3_add' : "media,|,pastetext,pasteword,|,tablecontrols",
'theme_advanced_toolbar_location' : "top",
'theme_advanced_toolbar_align' : "left",
'theme_advanced_statusbar_location' : "bottom",
'theme_advanced_resizing' : True,
# STYLING
'width' : '85%', 'height' : '500px',
}
FILEBROWSER_DIRECTORY = ''
FILEBROWSER_URL_FILEBROWSER_MEDIA = '/static/filebrowser/'
FILEBROWSER_PATH_FILEBROWSER_MEDIA = PROJECT_PATH + FILEBROWSER_URL_FILEBROWSER_MEDIA
FILEBROWSER_DEFAULT_SORTING_BY = 'filename_lower'
FILEBROWSER_DEFAULT_SORTING_ORDER = 'asc'
FILEBROWSER_MAX_UPLOAD_SIZE = 1024*1024*100
Here's a screenshot. My settings make even folders selectable.
If this doesn't work maybe we can do a Google Hangout, Skype or Facetime.
from django-filebrowser-no-grappelli.
Hi,
Sorry for bothering you again. :)
I changed the settings exactly how you mentioned but I am still not able to see the 'Select' Buttons. Also I am not overriding any of filebrowser's template. Could you please contact me on my email id ([email protected])?
from django-filebrowser-no-grappelli.
Related Issues (20)
- global name 'dir_name' is not defined HOT 3
- CollapsedFieldsets.js is missing. HOT 7
- The requested File does not exist. HOT 1
- setup.py misses installing templates dir HOT 1
- messages_set problem HOT 1
- Upgrade to filebrowser 3.4.1 HOT 1
- Admin image path broken for Django<=1.3 HOT 1
- Issue with files without creation date HOT 1
- Sacyrity problem! directory listing. HOT 8
- 'User' object has no attribute 'message_set' HOT 1
- Useless directories HOT 1
- Multiple thumbnails
- Don't work in Django 1.5. HOT 2
- FileBrowserField does not work for inline fields in admin
- Delete checkboxes
- Filebrowser repo seems stoped HOT 3
- There's another no-grappelli fork that looks more up to date
- upload method HOT 4
- Inlines problem HOT 5
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-filebrowser-no-grappelli.