Skip to content

Commit f7c9aed

Browse files
committed
fix trivial
1 parent 32c649c commit f7c9aed

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

mdict/static/mdict/ckeditor5/ckeditor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"versionPlatform":"unknown","editorParameters":{},"imageFormat":"svg","CASEnabled":false,"customHeaders":"","parseModes":["latex"],"editorToolbar":"","editorAttributes":"width=570, height=450, scroll=no, resizable=yes","base64savemode":"default","modalWindow":true,"version":"8.8.0.1477","enableAccessibility":true,"saveMode":"xml","saveHandTraces":false,"editorUrl":"http://www.wiris.net/demo/editor/editor","editorEnabled":true,"chemEnabled":true,"CASMathmlAttribute":"alt","CASAttributes":"width=640, height=480, scroll=no, resizable=yes","modalWindowFullScreen":false,"imageMathmlAttribute":"data-mathml","hostPlatform":"unknown","wirisPluginPerformance":true}

mysite/urls.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from django.contrib import admin
66
from django.contrib.auth.models import User, Group
77
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
8-
from django.http import HttpResponse
8+
from django.http import HttpResponse, JsonResponse
99
from django.shortcuts import redirect
1010
from django.shortcuts import render
1111
from django.urls import path, include
@@ -102,13 +102,23 @@ def swView(request):
102102
return HttpResponse('')
103103

104104

105+
def get_configurationjs(request):
106+
try:
107+
with open(settings.BASE_DIR + "/mdict/static/mdict/ckeditor5/configurationjs", 'r', encoding='utf-8') as f:
108+
data = json.load(f)
109+
except Exception as e:
110+
print('urls.py get_configurationjs error:', e)
111+
return JsonResponse(data)
112+
113+
105114
urlpatterns = i18n_patterns(
106115
path('', main, name='main'),
107116
path('getindexsites/', get_index_sites),
108117
path('mynav/', include('mynav.urls')),
109118
path('api/', include(router.urls)), # djangoresrframework生成的url
110119
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
111120
path('font/', redirect_font),
121+
path('ck5/configurationjs', get_configurationjs),
112122
path('mdict/', include('mdict.urls')),
113123
re_path(r'^admin/', admin.site.urls),
114124
re_path(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}),

0 commit comments

Comments
 (0)