I am a new user to Django and Django Cms.
on local machine
all js, html,css files download well when i work with backend
But on production when i use text plugin I can't get some files
There are:
GET http://example.com/admin/cms/page/15/edit-plugin/56/lang/uk.js/ 500 (Internal Server Error)
GET http://example.com/admin/cms/page/15/edit-plugin/56/iframe/default/wymiframe.html/ 500 (Internal Server Error) (Status Code:301 MOVED PERMANENTLY)
Where example.com - my own site:)
File uk.js - i added by monkey patching. (everything work fine on local machine)
In my html code in local I have:
<iframe src="/static/cms/wymeditor/iframe/default/wymiframe.html" onload="this.contentWindow.parent.WYMeditor.INSTANCES[0].initIframe(this)"></iframe>
On production side:
<iframe src="iframe/default/wymiframe.html" onload="this.contentWindow.parent.WYMeditor.INSTANCES[0].initIframe(this)"></iframe>
My urls.py:
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('core.urls')),
)
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT}))
my core urls.py:
from django.conf.urls import patterns, url, include
from django.http import HttpResponse
urlpatterns = patterns('core.views',
url(r"^robots.txt$", lambda r: HttpResponse("User-agent: *\nDisallow: /", mimetype="text/plain")),
url(r"^commissions/$","commissions", name = "commissions" ),
url(r"^commissions/(?P<slug>[a-zA-Z0-9_\-]+)/$","commissions", name = "comma" ),
url(r'^news/', include('cmsplugin_news.urls'),{}),
url(r'^', include('cms.urls')),
)
WHen i do python manage.py collectstatic - everything fine and i have all static files on my static folder
Please help me what i doing wrong ?