I have just started using django-cms so please forgive my newbieness.
-
Every time i try to upload a file in the admin area, for example an
image file using cmsplugin_filer_file’ / cmsplugin_filer_image it
comes up as undefined in the clipboard area. It’s strange because
the running dots appear as if it is loading the image then bang image
undefined. It allows me to create folders but I cannot view uploaded
files.On closer inspection the image has been uploaded to a directory
under today’s date in media / filer dir (i.e media/filer/2012/03/27) however, no files are
displayed in admin. Could it be a
problem related to easy thumbnails and it is in fact that the
thumbnail doesn’t display? -
Also, would you recommend using the default django-cms filer and image plug-ins
instead? It says in the documentation that it only works for local
storages, does this mean that you will not be able to upload files
from your local computer in to your application in a production / shared hosting setting?
I would be very grateful for any help with these two questions.
Thanks
SETTINGS
MEDIA_ROOT = os.path.join(PROJECT_PATH, "media")
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(PROJECT_PATH, "static")
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
#'easy_thumbnails.processors.scale_and_crop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'easy_thumbnails',
'cms',
'mptt',
'menus',
'south',
'sekizai',
'filer',
'cmsplugin_filer_file',
'cmsplugin_filer_folder',
'cmsplugin_filer_image',
'cmsplugin_filer_teaser',
'cmsplugin_filer_video',
'cms.plugins.twitter',
'cms.plugins.text',
'cms.plugins.flash',
'cms.plugins.googlemap',
'cms.plugins.link',
URLS
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
url(r'^', include('cms.urls')),
)
if settings.DEBUG:
urlpatterns = patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
url(r'', include('django.contrib.staticfiles.urls')),
) + urlpatterns
Yep Timmy O’Mahony was correct. A JS directory was missing. Firebug sorted it.