stefanfoulis/django-filer — Issue #161: os.path.normpath on win32 causes use of \ rather than / in FILER_STATICMEDIA_PREFIX
Author: saundersmatt
Created: 2012-01-06 14:43:55+00:00
State: open

In filer/settings.py, the following line:

FILER_STATICMEDIA_PREFIX = os.path.normpath( getattr(settings, 'FILER_STATICMEDIA_PREFIX', os.path.join(settings.MEDIA_URL,'filer/') ) ) + '/'

Causes FILER_STATICMEDIA_PREFIX to be "\media\filer/". This causes Firefox 8 to not render all media files correctly.

Forcing the use of posixpath rather than ntpath (as imported by os.path) as below:

import posixpath

FILER_STATICMEDIA_PREFIX = posixpath.normpath( getattr(settings, 'FILER_STATICMEDIA_PREFIX', os.path.join(settings.MEDIA_URL,'filer/') ) ) + '/'

fixes said issues.