简体   繁体   English

Django Tinymce 文件管理器

[英]Django Tinymce file manager

I need a file manager for Django Tinymce.我需要一个 Django Tinymce 的文件管理器。

I have tried Django filebrowser, but I can't get it to work.我试过 Django 文件浏览器,但我无法让它工作。 It shows a button next to the "Image URL" feld, but when I click it nothing shows up.它在“图像 URL”字段旁边显示一个按钮,但是当我单击它时,什么也没有显示。 How do it make it work?它是如何工作的?

Or... is there a better alternative?或者……有更好的选择吗?

Kind Regards,亲切的问候,

Marian玛丽安

2 Marian: 2 玛丽安:

Module for integration TinyMCE/images plugin into a python project.用于将 TinyMCE/images 插件集成到 python 项目中的模块。 For Django & Image Manager 1.1 beta1.对于 Django 和 Image Manager 1.1 beta1。

Installation安装

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy tinymce folder to your Django project root folder.将 tinymce 文件夹复制到 Django 项目根文件夹。

Add to main urls.py these strings:添加到主 urls.py 这些字符串:

(r'^static/js/tiny_mce/plugins/images/connector/python/', include('tinymce.images.urls')),

'static/js/tiny_mce' should be changed to your TinyMCE url. 'static/js/tiny_mce' 应更改为您的 TinyMCE url。

If you work with development server, these lines should be added:如果您使用开发服务器,则应添加以下行:

(r'^static/(?P<path>.*)$', 'django.views.static.serve',
    {'document_root': 'D:\dev\djcode\mysite\media'}),

(r'^uploads/(?P<path>.*)$', 'django.views.static.serve',
    {'document_root': 'D:\dev\djcode\mysite\uploads'}),

'D:\dev\djcode\mysite' should be changed to absolute path of your Django project folder. 'D:\dev\djcode\mysite' 应更改为 Django 项目文件夹的绝对路径。

Problems问题

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  1. Multiple files upload doesn't work because flash doesn't send COOKIES.多个文件上传不起作用,因为 flash 不发送 COOKIES。 Django work with sessions through cookies by default.默认情况下,Django 通过 cookies 处理会话。 So we are waiting for flash module fixes.所以我们正在等待 flash 模块修复。

  2. As for now - only in English.至于现在 - 只有英文。

Try this Django-tinymce-filebrowser试试这个 Django-tinymce-filebrowser

https://pypi.python.org/pypi/Django-tinymce-filebrowser https://pypi.python.org/pypi/Django-tinymce-filebrowser

Its allow to manage images and files from tinyMCE它允许管理来自 tinyMCE 的图像和文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM