我正在PythonAnywhere部署一个Django项目,使用django-tinymce/django-summernote(我已经试过了,但得到的是同样的错误)。一切都在本地正常工作,但在PythonAnywhere,我没有得到我应该得到的富文本编辑器。
我拉起JavaScript控制台,注意到有几个404错误。我试图通过在我的URL字段中输入domain.com/static/summernote/summernote.css来手动导航到我的静态文件,得到了以下404错误。
Using the URLconf defined in Domain.urls, Django tried these URL patterns, in this order:
1. ^$ [name='article_list']
2. ^posts/(?P<pk>\d+) [name='post_detail']
3. ^search$ [name='search_result']
4. ^summernote/
5. ^media\/(?P<path>.*)$
6. ^admin/
The current path, static/summernote/summernote.css, didn't match any of these.
然而,当我输入其他CSS或JS文件的路径时(这些文件在同一个静态目录中),该文件就会出现。另外,在本地输入路径 (http://127.0.0.1:8000/static/summernote/summernote.css) workes fine.
所以现在我真的不知道该怎么做。有什么想法吗?