File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 90
90
91
91
TINYMCE_COMPRESSOR = True
92
92
93
+ # Check to see if django-filebrowser is installed
94
+ try :
95
+ import filebrowser
96
+ INSTALLED_APPS += ('filebrowser' ,)
97
+ TINYMCE_FILEBROWSER = True
98
+ except ImportError :
99
+ pass
100
+
93
101
TINYMCE_DEFAULT_CONFIG = {
94
102
'theme' : "advanced" ,
95
103
'plugins' : "spellchecker" ,
Original file line number Diff line number Diff line change 4
4
5
5
admin .autodiscover ()
6
6
7
- urlpatterns = patterns ('' ,
7
+ urlpatterns = patterns ('' )
8
+
9
+ if getattr (settings , 'TINYMCE_FILEBROWSER' , False ):
10
+ urlpatterns += patterns ('' ,
11
+ url (r'^admin/filebrowser/' , include ('filebrowser.urls' )),
12
+ )
13
+
14
+ urlpatterns += patterns ('' ,
8
15
url (r'^tinymce/' , include ('tinymce.urls' )),
9
16
url (r'^admin/(.*)' , admin .site .root ),
10
17
url (r'^%s(?P<path>.*)$' % settings .MEDIA_URL [1 :],
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ def gzip_compressor(request):
112
112
113
113
# Add filebrowser
114
114
if tinymce .settings .USE_FILEBROWSER :
115
- content .append (render_to_response ('tinymce/filebrowser.js' , {},
116
- context_instance = RequestContext (request )))
115
+ content .append (render_to_string ('tinymce/filebrowser.js' , {},
116
+ context_instance = RequestContext (request )). encode ( "utf-8" ) )
117
117
118
118
# Restore loading functions
119
119
content .append ("tinyMCE_GZ.end();" )
You can’t perform that action at this time.
0 commit comments