https://github.com/gregplaysguitar/django-fileman
django-fileman adds user-uploaded static files to the django admin (i.e. images, media, documents) and integrates with tinymce
https://github.com/gregplaysguitar/django-fileman
django django-admin tinymce uploads
Last synced: 4 months ago
JSON representation
django-fileman adds user-uploaded static files to the django admin (i.e. images, media, documents) and integrates with tinymce
- Host: GitHub
- URL: https://github.com/gregplaysguitar/django-fileman
- Owner: gregplaysguitar
- License: other
- Created: 2017-02-06T22:16:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T20:55:02.000Z (about 7 years ago)
- Last Synced: 2025-09-25T12:25:06.618Z (5 months ago)
- Topics: django, django-admin, tinymce, uploads
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 6
- Watchers: 3
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
django-fileman adds user-uploaded static files to the django admin
(i.e. images, media, documents) and integrates with tinymce
[](https://circleci.com/gh/gregplaysguitar/django-fileman)
[](https://codecov.io/gh/gregplaysguitar/django-fileman)
[](https://pypi.python.org/pypi/django-fileman/)
Requirements
------------
- Python 2.7, 3.4 or 3.5
- Django 1.8+
Installation
------------
1. Download the source from https://pypi.python.org/pypi/django-fileman/
and run `python setup.py install`, or:
> pip install django-fileman
2. Add fileman to `INSTALLED_APPS`
3. Set `FILEMAN_DIRECTORY` to a subdirectory of your `MEDIA_ROOT` (make sure
it exists, it won't be created). Defaults to `'user'`
4. Make sure the [django admin](https://docs.djangoproject.com/en/1.10/ref/contrib/admin/)
is installed correctly
Usage
-----
You should now have an "Uploads" section in your django admin which allows you to
manage/upload files under your `FILEMAN_DIRECTORY`.
TinyMCE
-------
There are two options for TinyMCE integration. The simplest is to set TinyMCE's
`link_list` parameter to the url for 'admin:fileman_link_list', i.e.
tinymce.init({
selector: 'textarea',
plugins : 'link',
link_list: '{% url "admin:fileman_link_list" %}',
toolbar: 'link'
});
this should work with any modern TinyMCE version (from 3 onwards)
Alternately, set TinyMCE's file_picker_callback option to integrate with the
image, media and link dialogs. For example, in your `admin/base_site.html`
template:
{% include 'fileman/static.html' %}
tinymce.init({
selector: 'textarea',
plugins : 'link media image',
file_picker_callback: window.fileman.tinymceFilePickerCallback,
toolbar: 'link media image'
});
TinyMCE 4.x is required.
## Running tests
Use tox ():
> pip install tox
> cd path-to/django-fileman
> tox