这是我的urls.py
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth import views
from django.conf import settings
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/login/$', views.login, name='login'),
url(r'^accounts/logout/$', views.logout, name='logout', kwargs={'next_page': '/'}),
url(r'^ckeditor/', include('ckeditor_uploader.urls')),
url(r'', include('blog.urls')),
]
settings.py
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
LOGIN_REDIRECT_URL = '/'
MEDIA_URL = '/media/'
CKEDITOR_UPLOAD_PATH = 'uploads/'
CKEDITOR_JQUERY_URL = 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
错误代码
我将上传图像使用CKeditor。
然而,有一个404 error
。
我该怎么办?你知道吗
要使用开发服务器来传递媒体文件,您的应用程序中需要这样的内容网址.py你知道吗
据我所知,Ckeditor不会自动添加,因此您需要将此代码添加到您的网址.py你知道吗
相关问题 更多 >
编程相关推荐