1. David Jean Louis
  2. django-admin-tools
  3. Issues
Issue #23 resolved

render_theming_css tag does not work on windows

Anonymous created an issue

The approach of joining url path components with os.path.join() does not work properly on win as the defaulet separator is '\' and not '/' as expected in a url.

I think it would be safer to use the join() method of string:

def render_theming_css(): """ Template tag that renders the needed css files for the theming app. """ css = getattr(settings, 'ADMIN_TOOLS_THEMING_CSS', False) if css: css = '/'.join([get_media_url(), css]) else: css = '/'.join([get_media_url(), 'admin_tools', 'css', 'theming.css']) return '<link rel="stylesheet" type="text/css" media="screen" href="%s" />'

Comments (1)

  1. Log in to comment