I can't use django-tinymce upload picture,I installed django-filebrowser -
i have question django-tinymce upload picture
. django-filebrowser installed project , work well.i can use filebrosefiled upload files. next installed django-tinymce project,used tinmyce edit content,everything ok except upload image local. can't open brose page when click browse button,see ![enter image description here][1]picture!:
the terminal return error message: "get /tinymce/filebrowser/ http/1.1" 500 71915
my setting file:
# django settings max project. # coding:utf-8 debug = true template_debug = debug admins = ( # ('your name', 'your_email@domain.com'), ) managers = admins databases = { 'default': { 'engine': 'mysql', # add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'name': 'max_db', # or path database file if using sqlite3. 'user': 'root', # not used sqlite3. 'password': '', # not used sqlite3. 'host': '', # set empty string localhost. not used sqlite3. 'port': '', # set empty string default. not used sqlite3. } } # local time zone installation. choices can found here: # http://en.wikipedia.org/wiki/list_of_tz_zones_by_name # although not choices may available on operating systems. # on unix systems, value of none cause django use same # timezone operating system. # if running in windows environment must set same # system time zone. time_zone = 'america/chicago' # language code installation. choices can found here: # http://www.i18nguy.com/unicode/language-identifiers.html language_code = 'en-us' site_id = 1 # if set false, django make optimizations not # load internationalization machinery. use_i18n = true # if set false, django not format dates, numbers , # calendars according current locale use_l10n = true # absolute filesystem path directory hold user-uploaded files. # example: "/home/media/media.lawrence.com/" media_root = '/home/qin/django/max/uploads/' # url handles media served media_root. make sure use # trailing slash if there path component (optional in other cases). # examples: "http://media.lawrence.com", "http://example.com/media/" media_url = '/site_media/' # url prefix admin media -- css, javascript , images. make sure use # trailing slash. # examples: "http://foo.com/media/", "/media/". admin_media_prefix = '/admin_media/' # make unique, , don't share anybody. secret_key = 'aab%%d&_qxn8f0dd@v3q3_gdbn_joraege%q1tzl@uq6v1_3c#' # list of callables know how import templates various sources. template_loaders = ( 'django.template.loaders.filesystem.loader', 'django.template.loaders.app_directories.loader', # 'django.template.loaders.eggs.loader', ) middleware_classes = ( 'django.middleware.common.commonmiddleware', 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', ) root_urlconf = 'max.urls' template_dirs = ( '/home/qin/django/max/templates/' # put strings here, "/home/html/django_templates" or "c:/www/django/templates". # use forward slashes, on windows. # don't forget use absolute paths, not relative paths. ) installed_apps = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'max.grappelli', 'max.filebrowser', 'max.tinymce', # uncomment next line enable admin: 'django.contrib.admin', # uncomment next line enable admin documentation: # 'django.contrib.admindocs', 'max.article', 'max.computer', 'max.person', ) #filebrowse_directory="/home/qin/django/max/uploads" filebrowser_debug=true #the absolute path directory holds media-files. filebrowser_media_root="/home/qin/django/max/uploads/" #filebrowser_media_root="" #url handlers media served media_root. filebrowser_media_url="http://192.168.213.132/uploads/" filebrowser_url_filebrowser_media="/admin_media/filebrowser/" filebrowser_path_filebrowser_media="" filebrowser_directory="uploads/" filebrowser_url_tinymce='/admin_media/tiny_mce/' filebrowser_path_tinymce='/admin_media/tiny_mce/' #the url of tinymce javascript file. tinymce_js_url=(admin_media_prefix+'tiny_mce/tiny_mce.js') tinymce_default_config={ 'plugins':"spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", 'theme':"advanced", 'cleanup_on_startup':true, 'custom_undo_redo_levels':10, 'with':'100%', 'height':'400', 'verify_html':true, 'accessibility_warnings':false, } tinymce_js_root=('/home/qin/django/max/admin_medias/tiny_mce/') tinymce_filebrowser=true
Comments
Post a Comment